To answer my own question, what's needed is to override
DatePickerSettings.toScript(...) and specify %y where it specifies %Y.
On Thu, May 22, 2008 at 10:39 AM, nate roe [EMAIL PROTECTED] wrote:
Hrm, I think that StyleDateConverter is new to Wicket 1.3, as is the
forDatePattern method, unfortunately. I guess I can dig around in the
DatePicker source and see if I can figure it out.
The thing is, the DateTextField is following my format instructions, but
when you pick a date from the calendar of the DatePicker, it reverts to the
locale default. specifically i'm trying to reduce the year to two digits.
On Thu, May 22, 2008 at 7:25 AM, Beyonder Unknown [EMAIL PROTECTED]
wrote:
Hi Nate, I think you have to create/override the factor method in
DateTextField and set it from there:
protected DateTextField newDateTextField(String id, PropertyModel
dateFieldModel)
{
return new DateTextField(id, dateFieldModel, new
StyleDateConverter(false)).forDatePattern(id,dateFieldModel, MM/ddyy);
}
Hope this helps!
Regards,
Wen Tong--
The only constant in life is change.
- Original Message
From: nate roe [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Wednesday, May 21, 2008 3:38:00 PM
Subject: Formatting a DatePickerSettings
I'm using Wicket 1.2, and WicketExtensions 1.2.
I have a DateTextField that is formatted with the String, MM/dd/yy This
field has a corresponding DatePickerSettings, but the DatePickerSettings
doesn't follow this format (it adds dates with four-digit years,
MM/dd/.)
How can I change this?
Thanks,
Nate
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]