{
selectedLocale = LOCALE_EN;
}
});
add(localeForm);
DateTextField dateTextField = new DateTextField("dateTextField", new PropertyModel<Date>(
this, "date"), new StyleDateConverter("S-", true))
{
@Override
public Locale getLocale()
{
return selectedLocale;
}
};
Form<?> form = new Form<Void>("form")
{
@Override
protected void onSubmit()
{
info("set date to " + date);
}
};
add(form);
form.add(dateTextField);
DatePicker datePicker = new DatePicker()
{
@Override
protected String getAdditionalJavaScript()
{
return "${calendar}.cfg.setProperty(\"navigator\",true,false); ${calendar}.render();";
}
};
datePicker.setShowOnFieldClick(true);
datePicker.setAutoHide(true);
dateTextField.add(datePicker);
add(new FeedbackPanel("feedback"));
Form<?> form2 = new Form<Void>("form2")
{
@Override