This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Calendar with Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Calendar with Struts" Watch "Calendar with Struts" New topic

Calendar with Struts

S Krishnan

Joined: Aug 22, 2005
Posts: 5
I have some problems with Calendar in Struts.
I could get the JavaScript calendar in ordinary jsp, but I am not able to get it working with the Struts tag library. Kindly help me with this. The code I used is;

<script type="text/javascript" src="calendar.js" />
<script type="text/javascript" src="calendar-en.js" />
<script type="text/javascript" src="calendar-setup.js" />
<script type="text/javascript">
inputField : "f_date_b",
ifFormat : "%m/%d/%Y %I:%M %p",
showsTime : true,
button : "f_trigger_b",
singleClick : false,
step : 1

<html:form action="/" name="testForm"
type="Example.TestForm" >
<html:text property="date" styleId="f_date_b" />
<html:button property="button" styleId="f_trigger_b">...</html:button>


Though I am able to get the required lay out, nothing happens when i click the date button. Is there anything else that I need to do.

Please help me clear this.

[ August 22, 2005: Message edited by: S Krishnan ]
[ August 22, 2005: Message edited by: S Krishnan ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
One suggestion I would make is that you may want to look at the input field name. If you're using a struts tag, the name of the field may not be what you expect it to be. To find out the name used by the actual rendered HTML tags, display the page and use your browser's "View Source" function to see the actual HTML. Then verify that you are using the right name field in your calendar javaScript.

Consultant, Sima Solutions
subject: Calendar with Struts
Similar Threads
How to call jquery method in Struts.
pass a variable in the URl
struts action class
Validation framework not working for login screen
img tag empty src attribute causes duplicate form submission