Changing the date format of org.apache.wicket.extensions.yui.calendar.DateField
does not work
---------------------------------------------------------------------------------------------
Key: WICKET-2375
URL: https://issues.apache.org/jira/browse/WICKET-2375
Project: Wicket
Issue Type: Bug
Components: wicket-extensions
Affects Versions: 1.4-RC7
Environment: Windows Vista, JDK 6 update 14
Reporter: Vikash Madhow
Priority: Minor
I've tried many different ways of changing the date pattern of the selected
date in DateField but none worked. I've looked at the produced javascript code
and I could see that the datePattern is set to the configured date format
(dd-MMM-yy); however, the selected date is still displayed in the following
format 'dd-MM-yyyy' .
Below is my code for creating the DateField and setting the date pattern:
<code>
editor = new DateField("editor", new PropertyModel(model, property))
{
@Override
protected DateTextField newDateTextField(String id, PropertyModel
model)
{
return DateTextField.withConverter(id, model,
new PatternDateConverter("dd-MMM-yy", true));
}
@Override
protected DatePicker newDatePicker()
{
return new DatePicker()
{
@Override
protected String getDatePattern()
{
return "dd-MMM-yy";
}
};
}
};
</code>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.