You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from v14 to v23 we are seeing a strange error message, that doesn't even make much sense. We don't have any locale specified for the picker.
The component seems to be working though.
Expected outcome
no error
Minimal reproducible example
privateval startTime =DateTimePicker()
Steps to reproduce
open a page with a DateTimePicker
Environment
Vaadin version(s): 23.0.11
Flow: 23.0.8
OS: Windows 10
I tried to reproduce by adding a DateTimePicker but there is no error about locale. Probably needs some other setup code, browser local setting or server locale setting.
Is it possible that you see this error in V14 also but it gets hidden in the browser console? V23 will bring the errors to your attention but with V14 they can just go by unnoticed
It only happens on v23, not on v14. we tried on multiple workstations and are getting the same error. I'm not even sure where it is getting the en-US locale as ours is en-GB plus it displays the time 24-hours format which is not US.
Automated reproduction — produced by the Claude Code repro skill. Needs human verification.
The steps, verdict, and root-cause pointer below were generated automatically and must be confirmed by a human before being treated as authoritative.
Verdict: reproduced
Hypothesis tested: The bug is that TimePicker sends an ill-formed BCP 47 tag to its connector. It is triggered by a Locale whose language or country is not a valid subtag, such as new Locale("en_GB"). It is observable as vaadin-time-picker: The locale <tag> is not supported. in the console and the dev-mode error dialog.
Regression?: unknown. The Java tag-building code is identical on 23.0 and main. V14 likely swallowed the same error silently, as a maintainer suggested in the thread.
Branch:repro/3309, pushed to vaadin/flow-components
Reproduced on: flow-components @ main (25.4-SNAPSHOT, 5c881d1)
Present on main?: yes (still broken)
Theme / Browser: Lumo / Chromium (Playwright)
Screenshot (static bug):
Observed behavior
Each DateTimePicker below gets an explicit locale. The ill-formed ones throw from the time picker connector:
Error: vaadin-time-picker: The locale en_gb is not supported.
Error: vaadin-time-picker: The locale e is not supported.
Error: vaadin-time-picker: The locale en-GB_X is not supported.
Error: vaadin-time-picker: The locale en1 is not supported.
Row
Java Locale
Tag sent
Error
Date shown
Time shown
default
none (UI en_US)
en-US
no
2/1/2024
2:30 PM
uk
Locale.UK
en-GB
no
02/01/2024
14:30
underscore
new Locale("en_GB")
en_gb
yes
2/1/2024
14:30
hyphen
new Locale("en-GB")
en-gb
no
n/a
n/a
iw
new Locale("iw", "IL")
he-IL
no
n/a
n/a
The failing picker keeps working. The time part uses the web component default 24-hour format, because setLocale throws before it assigns i18n. The date part falls back silently to the browser locale. This matches all three points of the reporter:
The date picker logs no warning for the same locale. DatePicker sends Locale.toLanguageTag(), which returns und for ill-formed locales, and the browser accepts und.
Valid but unknown tags such as zz-ZZ do not throw. Only syntactically ill-formed tags do.
Expected behavior
No error. The time picker should fall back to a default locale, as the TimePicker.setLocale javadoc promises, and like DatePicker already does.
Steps to reproduce
Create new DateTimePicker() or new TimePicker().
Give it an ill-formed locale, for example picker.setLocale(new Locale("en_GB")).
The same happens without an explicit locale, when the UI locale is ill-formed. It can come from I18NProvider.getProvidedLocales(), UI.setLocale, or the JVM default locale.
Open the page. The dev-mode error dialog shows vaadin-time-picker: The locale en_gb is not supported.
Reproduction
How to run: start the server (mvn … jetty:run) and open the route below.
Query switch:?lang=<language>&country=<country> renders new Locale(lang, country) next to the default picker.
DateTimePickerpicker = newDateTimePicker();
picker.setLocale(newLocale("en_GB")); // tag sent to the connector: "en_gb"add(picker);
Root cause (suspected)
TimePicker.executeLocaleUpdate builds the tag by joining getLanguage() and getCountry() with no validation. An ill-formed value such as en_gb reaches the connector unchanged:
* If for some reason the browser doesn't support the given locale, the
* en-US locale is used.
Notes
Flow sets the session locale only from I18NProvider.getProvidedLocales() or Locale.getDefault(), never from Accept-Language directly. Headers such as en-GB-oxendict, zh-Hant-TW, en_GB and es-419 all left the UI at en_US and caused no error. The ill-formed locale in the report most likely came from application code, for example Locale("en_GB") in Kotlin.
Activity
Artur- commentedon Jun 9, 2022
I tried to reproduce by adding a DateTimePicker but there is no error about locale. Probably needs some other setup code, browser local setting or server locale setting.
Is it possible that you see this error in V14 also but it gets hidden in the browser console? V23 will bring the errors to your attention but with V14 they can just go by unnoticed
balazspeterfi commentedon Jun 13, 2022
It only happens on v23, not on v14. we tried on multiple workstations and are getting the same error. I'm not even sure where it is getting the
en-USlocale as ours isen-GBplus it displays the time 24-hours format which is not US.balazspeterfi commentedon Jun 13, 2022
Even without being able to reproduce it's clearly an incorrect message in many ways:
en-USso it is falling back to the defaulten-US???en-USit is clearly not displaying in that localeen-USeven coming from?web-padawan commentedon Jun 14, 2022
Here is the relevant code that is responsible for showing a warning:
flow-components/vaadin-time-picker-flow-parent/vaadin-time-picker-flow/src/main/resources/META-INF/resources/frontend/vaadin-time-picker/timepickerConnector.js
Lines 44 to 55 in 3bba708
Note, the same is also tested in the
DatePickerso ideally both should either pass or fail 🤔flow-components/vaadin-date-picker-flow-parent/vaadin-date-picker-flow/src/main/resources/META-INF/resources/frontend/datepickerConnector.js
Lines 78 to 84 in 3bba708
[-]DateTimePicker locale not supported[/-][+]DateTimePicker locale not supported [1 day][/+]yuriy-fix commentedon Jun 14, 2022
Let's research for 1 day if the issue could be reproduced in local.
web-padawan commentedon Sep 25, 2026
This was fixed in #9873.
web-padawan commentedon Sep 25, 2026
Warning
Automated reproduction — produced by the Claude Code
reproskill. Needs human verification.The steps, verdict, and root-cause pointer below were generated automatically and must be confirmed by a human before being treated as authoritative.
TimePickersends an ill-formed BCP 47 tag to its connector. It is triggered by aLocalewhose language or country is not a valid subtag, such asnew Locale("en_GB"). It is observable asvaadin-time-picker: The locale <tag> is not supported.in the console and the dev-mode error dialog.23.0andmain. V14 likely swallowed the same error silently, as a maintainer suggested in the thread.catchblock overwrotelocalewithen-USbefore building the text. The error itself still fires.repro/3309, pushed tovaadin/flow-componentsmain(25.4-SNAPSHOT, 5c881d1)Observed behavior
Each
DateTimePickerbelow gets an explicit locale. The ill-formed ones throw from the time picker connector:Localeen_US)en-US2/1/20242:30 PMLocale.UKen-GB02/01/202414:30new Locale("en_GB")en_gb2/1/202414:30new Locale("en-GB")en-gbnew Locale("iw", "IL")he-ILThe failing picker keeps working. The time part uses the web component default 24-hour format, because
setLocalethrows before it assignsi18n. The date part falls back silently to the browser locale. This matches all three points of the reporter:en-US, so the real tag stayed hidden.The date picker logs no warning for the same locale.
DatePickersendsLocale.toLanguageTag(), which returnsundfor ill-formed locales, and the browser acceptsund.Valid but unknown tags such as
zz-ZZdo not throw. Only syntactically ill-formed tags do.Expected behavior
No error. The time picker should fall back to a default locale, as the
TimePicker.setLocalejavadoc promises, and likeDatePickeralready does.Steps to reproduce
new DateTimePicker()ornew TimePicker().picker.setLocale(new Locale("en_GB")).I18NProvider.getProvidedLocales(),UI.setLocale, or the JVM default locale.vaadin-time-picker: The locale en_gb is not supported.Reproduction
How to run: start the server (
mvn … jetty:run) and open the route below.http://localhost:8080/repro-3309vaadin-date-time-picker-flow-parent/vaadin-date-time-picker-flow-integration-tests/src/main/java/com/vaadin/flow/component/datetimepicker/Repro3309View.java?lang=<language>&country=<country>rendersnew Locale(lang, country)next to the default picker.Root cause (suspected)
TimePicker.executeLocaleUpdatebuilds the tag by joininggetLanguage()andgetCountry()with no validation. An ill-formed value such asen_gbreaches the connector unchanged:flow-components/vaadin-time-picker-flow-parent/vaadin-time-picker-flow/src/main/java/com/vaadin/flow/component/timepicker/TimePicker.java
Lines 788 to 800 in 5c881d1
The connector then throws instead of falling back:
flow-components/vaadin-time-picker-flow-parent/vaadin-time-picker-flow/src/main/resources/META-INF/frontend/vaadin-time-picker/timepickerConnector.ts
Lines 37 to 44 in 5c881d1
DatePickeralready handles this case withtoLanguageTag()and anlvariantcheck:flow-components/vaadin-date-picker-flow-parent/vaadin-date-picker-flow/src/main/java/com/vaadin/flow/component/datepicker/DatePicker.java
Lines 1022 to 1038 in 5c881d1
The javadoc promises an
en-USfallback that the code never does:flow-components/vaadin-time-picker-flow-parent/vaadin-time-picker-flow/src/main/java/com/vaadin/flow/component/timepicker/TimePicker.java
Lines 733 to 734 in 5c881d1
Notes
I18NProvider.getProvidedLocales()orLocale.getDefault(), never fromAccept-Languagedirectly. Headers such asen-GB-oxendict,zh-Hant-TW,en_GBandes-419all left the UI aten_USand caused no error. The ill-formed locale in the report most likely came from application code, for exampleLocale("en_GB")in Kotlin.DatePickerdoes. The alternative is a real fallback in the connectorcatchblock. fix: name the unsupported locale in the time picker error #9873 left that fallback out on purpose, as a behavior change.pom.xmledits were needed.vaadin-bot commentedon Sep 29, 2026
This ticket/PR has been released with Vaadin 25.4.0-alpha1.