You could also look into using the YUI plugin:

http://cwiki.apache.org/S2PLUGINS/yui-plugin.html

Matt

On Dec 5, 2007, at 6:08 AM, John Kwon wrote:

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.


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