DateField: formatting of selected date ignores Locale
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
When I set the Locale globally in Vaadin and/or for a DateField locally, the dropdown is correctly localized but when I select a date, the formatting doesn't use my Locale but prints English weekday names. I would expect that the formatted date was also localized using the provided Locale.
example (also see attached example project datefield-bugdemo.zip)
The code
final DateField dateField = new DateField();
dateField.setLocale(new Locale("de", "DE"));
dateField.setDateFormat("EE, dd.MM.yyyy");
displays the dropdown correctly localized:

but when selected, the date is not localized anymore:

used versions
- Vaadin Framework 8.3.2
- Firefox 59.0.1
- Spring Boot 2.0.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the attached datefield-bugdemo.zip with Vaadin Framework 8.3.2 and reproduce the difference between the localized dropdown and the selected-date display using DateField.setLocale(new Locale("de", "DE")) and setDateFormat("EE, dd.MM.yyyy"). Trace the DateField formatting path and verify that the selected date uses the provided locale, matching the dropdown's localization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100