You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by tubin gen <fa...@gmail.com> on 2009/05/22 21:04:49 UTC
date format with datepicker
I have a date field
add(new
org.apache.wicket.extensions.markup.html.form.DateTextField("auditEndDate").add(new
org.apache.wicket.extensions.yui.calendar.DatePicker()));
this date picker puts the selected date in the format 1/1/01 can I
configure this to format date as 1/1/2001 ? When user selectes a date
the date which appears in datetextfiled should be of format 1/1/2001 ,
please tell me how can i do this ?
Re: date format with datepicker
Posted by mallet <ry...@gmail.com>.
Look at this constructor in the javadocs:
http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/extensions/markup/html/form/DateTextField.html
DateTextField(java.lang.String id, IModel model, java.lang.String
datePattern)
the pattern is SimpleDateFormat, e.g. something like:
org.apache.wicket.extensions.markup.html.form.DateTextField("auditEndDate",
"MM/dd/yyyy").add(new
org.apache.wicket.extensions.yui.calendar.DatePicker()));
(assuming you want month/day/year and not day/month/year, in which case it
would be "dd/MM/yyyy")
fachhoch wrote:
>
> I have a date field
>
> add(new
> org.apache.wicket.extensions.markup.html.form.DateTextField("auditEndDate").add(new
> org.apache.wicket.extensions.yui.calendar.DatePicker()));
> this date picker puts the selected date in the format 1/1/01 can I
> configure this to format date as 1/1/2001 ? When user selectes a date
> the date which appears in datetextfiled should be of format 1/1/2001 ,
> please tell me how can i do this ?
>
>
--
View this message in context: http://www.nabble.com/date-format-with-datepicker-tp23676299p23676644.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org