-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date binding misbehaves (probably depending on locale) #7897
Comments
Can you please confirm this bug? (@Conduitry, I found you added such label to one of the issues). The latest repl: |
dummdidumm
added a commit
that referenced
this issue
Feb 23, 2024
fixes #7897 No test because this is only visually observable
5 tasks
dummdidumm
added a commit
that referenced
this issue
Feb 23, 2024
fixes #7897 No test because this is only visually observable
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Date binding
input type=date bind:value={date}
is broken if system locale (at least on Windows) is not set to MM/DD/YY (so it is broken for DD/MM/YY or YY/MM/DD), especially when editing an existing date.I tested Chrome, Edge and Firefox.
Using
on:input={e => date=e}
oron:change
will not work either.Reproduction
With locale DD/MM/YYYY, the most annoying case is when you type "0" (for 01) in days or months, it resets the whole field (if there is an existing date already).
REPL with examples:
https://svelte.dev/repl/594639752b464fdc8ad7cc2d50f3d499?version=4.2.8
Logs
No particular logs, in some cases I was able to make it log
System Info
Windows 11, regional settings set to Czech. Newest Chrome and Firefox. Newest Svelte (from 3.55.1 up to 4.2.8)
Severity
annoyance
Workaround
As a workaround, use two variables instead of one.
The text was updated successfully, but these errors were encountered: