fix(VDateInput): derive display format from date adapter locale - #22976
Merged
Conversation
VDateInput inferred its display/parse format from the i18n locale (useLocale().current) instead of the configured date adapter's locale. Every other date component formats via the adapter, so an app whose date adapter used a different locale (e.g. Luxon with en-GB) would see the picker honour en-GB while the input field still rendered en-US. Route useDateFormat through the adapter's locale so the input is consistent with the rest of the date components. No-op for the default setup, where the adapter locale already tracks the i18n locale. Repro: https://github.com/johnleider/vdateinput-locale-repro
J-Sek
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VDateInput inferred its display/parse format from the i18n locale (
useLocale().current) instead of the configured date adapter's locale. Every other date component formats via the adapter, so an app whosedateadapter used a different locale (e.g. Luxonen-GB) saw the picker honour en-GB while the input field still rendered en-US.This routes
useDateFormatthrough the adapter's locale, so the input is consistent with the rest of the date components. It is a no-op for the default setup, where the adapter locale already tracks the i18n locale.Repro: https://github.com/johnleider/vdateinput-locale-repro
Workaround on current versions:
display-format="keyboardDate".