vaadin / cookbook

Copy & paste recipes for Vaadin
https://cookbook.vaadin.com/
Apache License 2.0
20 stars 38 forks source link

DatePickerI18NExample: weekdays are not aligned #329

Closed javier-godoy closed 2 months ago

javier-godoy commented 4 months ago

DatePickerI18NExample should take into account that the result of DateFormatSymbols.getWeekdays returns 8 items instead of 7, see https://github.com/vaadin/flow-components/issues/6353#issuecomment-2175966174

https://github.com/vaadin/cookbook/blob/8a10bee764c62089733a959deafb5e1c559ac93b/src/main/java/com/vaadin/recipes/recipe/datepicker18n/DatePickerI18NExample.java#L44

javier-godoy commented 2 months ago
-i18n.setWeekdays(List.of(dfs.getWeekdays()));
+i18n.setWeekdays(List.of(dfs.getWeekdays()).stream().skip(1).toList());