DatePickerSettings settings = new DatePickerSettings();
settings.setStyle( settings.newStyleWinter() );
settings.setIcon( new ResourceReference(this.getClass(), "calendar.gif") );
DatePicker picker = new PopupDatePicker("datePicker", dateField, settings);
// This sucks! It expects a DateConverter. I've got my own.
DateConverter dateConverter = new DateConverter() {
private static final long serialVersionUID = 1L;
@Override
public DateFormat getDateFormat(Locale locale)
{
SimpleDateFormat dateFmt = new SimpleDateFormat(fmt);
dateFmt.setTimeZone(TimeZone.getTimeZone("GMT"));
return dateFmt;
}
@Override
protected Class getTargetType()
{
return type;
}
};
picker.setDateConverter(dateConverter);
fragment.add(picker);
if (displayTz) {
Label label = new Label("timezone", model) {
private static final long serialVersionUID = 1L;