vaadin/vaadin-date-picker

setLocale lossing after Tab switch

Fr33z3m4n opened this issue · 1 comments

Description

If you use the Date Picker in a tab and the tabs change, the DatePicker Textfield loses the setLocale setting.

Example:

setLocale (Locale.GERMAN);
setLocalGerman ();
private void setLocalGerman () {
setI18n (new DatePickerI18n (). setWeek ("week") ...........
}

After switching back to the tab, the English time setting is displayed again.

Workaround:

@Override
protected void onAttach (AttachEvent attachEvent) {
setLocale (Locale.GERMAN);
setLocalGerman ();
super.onAttach (attachEvent);
}

date-picker-ticket-1
date-picker-ticket-2

Steps to reproduce

  1. Put a vaadin-date-picker element in the first Tabpage.
  2. Open the page in a web browser.
  3. Click the input of vaadin-date-picker element.
  4. Click 2nd Tab
  5. Click 1st Tab
  6. Format reverted to English

Browsers Affected

  • [x ] Chrome
  • Firefox
  • Safari
  • Edge
  • IE 11
  • iOS Safari
  • Android Chrome

This issue was moved to vaadin/vaadin-date-picker-flow#152