You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by david_ <me...@gmail.com> on 2011/10/27 08:15:18 UTC

Re: Invalid Date Using DatePicker and Short Date Format

any help on this?

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Invalid-Date-Using-DatePicker-and-Short-Date-Format-tp3058289p3943329.html
Sent from the Users forum 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


Re: Invalid Date Using DatePicker and Short Date Format

Posted by "nebojsa.nedic" <ne...@gmail.com>.
I am not sure about your example, but this is working and it might help.
Maybe there are better ways to do it as well.

....
String dateFormat = "dd.MM.yyyy";

DateTextField dateField = new DateTextField("date", new
PropertyModel<Date>(...), dateFormat);
startDateField.add(DateValidator.range(calMin.getTime(), calMax.getTime(),
dateFormat));//Validation
DatePicker datePickerStartDate = new DatePicker();
datePickerStartDate.setShowOnFieldClick(true);
....

Hopefully this helps...

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Invalid-Date-Using-DatePicker-and-Short-Date-Format-tp3058289p3944711.html
Sent from the Users forum 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