dva
(Валерий Дмитрущенков)
March 29, 2024, 3:11pm
1
We are developing a localized application using JMIX framework 2.1.2 and Studio version 2.2.0.
In our application, we used the datePicker component, Russian Locale and date format: dd.MM.yyyy.
It’s not clear why the week in datePicker starts from Tuesday:
Please advise how should we display in datePicker the beginning of the week from Monday.
Thanks in advance.
yarik1706
(Ярослав Горожанкин)
March 31, 2024, 1:14am
2
As I can see, this problem is fixed in jmix version 2.2.0
opened 09:22AM - 26 Jan 24 UTC
closed 07:28AM - 01 Mar 24 UTC
type: bug
### Environment
Jmix version: 2.1.999-SNAPSHOT (Last version 2.1.2)
### Bu… g Description
The DatePicker-Component shows the wrong first day of week.
In English Sunday should be shown, but Jmix shows Monday.
In German (Locale de-DE) Tuesday is used instead of Monday.
### Steps To Reproduce
- Select German Locale (de-DE)
- Open Screen with DatePicker
- Open Date Popup -> First day of week is Tuesday (Di.)

### Proposed solution
Vaadin (https://javadoc.io/doc/com.vaadin/vaadin-platform-javadoc/14.4.3/com/vaadin/flow/component/datepicker/DatePicker.DatePickerI18n.html#setFirstDayOfWeek-int-) uses a different integer for day of week than java.util.Calendar (https://docs.oracle.com/javase/8/docs/api/java/util/Calendar.html#SUNDAY)
It is necessary to map the values.
1 Like