Closed javier-godoy closed 2 months ago
The problem is that converting the result of DateFormatSymbols.getWeekdays
or DateFormatSymbols.getShortWeekdays
into a List returns 8 items instead of 7.
For example:
System.out.println(String.join(",", dfs.getWeekdays()));
System.out.println(String.join(",", dfs.getShortWeekdays()));
Prints:
,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
,Sun,Mon,Tue,Wed,Thu,Fri,Sat
The JavaDoc mentions that you are supposed to access the results via an index specifically:
Gets weekday strings. For example: "Sunday", "Monday", etc. Returns: the weekday strings. Use Calendar. SUNDAY, Calendar. MONDAY, etc. to index the result array.
We could consider limiting the number of the weekdays rendered or/and warn user.
Description
If I configure I18n in a DatePicker, the weekdays are not stretched. For instance, in the following image (left), "Sun" seems to be displayed above July 1. Compare to a DatePicker instance without further configuration (right)
Expected outcome
I would expect both DatePickers to look similar.
Minimal reproducible example
Steps to reproduce
DatePicker
popup.Environment
Vaadin version(s): 24.3.13 Browser: Chrome 125
Browsers
No response