Matt put something in 2.0

>From APF-268..

Implemented with jscalendar.sf.net (LGPL).

To use in 2.0 RC1, perform the following steps:

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>

Unfortunately, the jscalendar's format string doesn't match Java's
SimpleDateFormat patterns.
  [ Show ยป <http://issues.appfuse.org/browse/APF-268> ]
 Matt Raible<http://issues.appfuse.org/secure/ViewProfile.jspa?name=mraible>-
01/Jun/07
03:15 AM Implemented with jscalendar.sf.net (LGPL). To use in 2.0 RC1,
perform the following steps: 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> Unfortunately, the jscalendar's format string doesn't match Java's
SimpleDateFormat patterns.


On 12/5/07, Jimmy <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am developing a simple web application with Appfuse. There is a model
> object with a java.util.Date type member.Is there any example on these
> problem.I am trying to use the datetimepicker of struts 2 but it doesnot
> work.Any idea.
>
> Thanks in Advance.
>
> Best Regards,
> Jimmy
>

Reply via email to