Thank you Jeromy!
When using the 'displayFormat="h:mm a"' in the datetimepicker tag and
changing currentTimePart to String, it will result the given Hours and
Seconds on the page.
So we set the following in our Action method:
this.setCurrentTimePart("16:15");
But....
we get the following stacktrace:
2007-06-28 16:40:44,969 ERROR http-8080-Processor21
components.DateTimePicker.format(316) : Could not parse date
java.text.ParseException: Unparseable date: "16:15"
at java.text.DateFormat.parse(DateFormat.java:335)
at
org.apache.struts2.components.DateTimePicker.format(DateTimePicker.java:309)
at
org.apache.struts2.components.DateTimePicker.evaluateParams(DateTimePicker.java:209)
at org.apache.struts2.components.UIBean.end(UIBean.java:481)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43)
.....
You got them too?
Jeromy Evans - Blue Sky Minds wrote:
>
> We use:
>
> <s:datetimepicker name="incomingAnswer" displayFormat="h:mm a"
> type="time"
> value="%{defaultAnswerTime}"
> required="true"/>
>
> where incomingAnswer and defaultAnswerTime are Strings in the hh:mm
> format. The string's components can then be applied to your Calendar
> object within the action.
>
> As discussed in recent threads, this version of the datetimepicker has a
> few issues that can avoided if you use String instead of Dates.
>
> An alternative you could try is to use javascript to combine/separate
> the value of the two datetimepickers to/from a single RFC3339 string, in
> which case the standard Date converter should work.
>
>
>
>
--
View this message in context:
http://www.nabble.com/DateTimePicker-%28type-time%29-problem-tf3994225.html#a11344528
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]