Reputation: 8090
I have a vaadin application with a DateField
. Sometimes randomly the days and the month are displayed as null
. The locale is set to German.
Any idea on how to prevent this?
instead of:
EDIT: I did some more testing, in the UI.init()
method I set the locale of the session. If I remove this line it works:
protected void init(VaadinRequest request) {
getSession().setLocale(Locale.getDefault());
....
}
Upvotes: 0
Views: 57
Reputation: 8090
I figured it out I have to set the locale of the UI
first:
protected void init(VaadinRequest request) {
setLocale(Locale.getDefault());
getSession().setLocale(Locale.getDefault());
....
}
Upvotes: 1