I'm using the instructions from Matt on adding jsCalendar to Appfuse 2.0 /
Struts 2 and it isn't working. The instructions are below.
I understand how the id is determined for the inputField but where does the
button id come from? It must have something to do with the textfield
title="date" and I see an img tag that gets created with what I put in for my
button: in the Calendar.setup but nothing happens when you click on it.
Any ideas? Is there anything else I might be missing?
1. Add title="date" to an <s:textfield> - for example:
<s:textfield key="person.modificationDate" required="true" cssClass="text"
size="11" title="date"/>
2. Add the calendar scripts to your page:
<script type="text/javascript" src="<c:url
value='/scripts/calendar/calendar.js'/>"></script>
<script type="text/javascript" src="<c:url
value='/scripts/calendar/calendar-setup.js'/>"></script>
<script type="text/javascript" src="<c:url
value='/scripts/calendar/lang/calendar-${pageContext.request.locale}.js'/>"></script>
3. Call Calendar.setup() from JavaScript:
<script type="text/javascript">
Calendar.setup({inputField: "personForm_person_modificationDate",
ifFormat: "%m/%d/%Y", button: "person.modificationDateDatePicker"});
</script>
thanks,
Ron