Skip to content
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

Input component with type="datetime-local" and step="1" behaves wrong #5708

Open
whiteancient opened this issue Sep 8, 2024 · 2 comments
Open

Comments

@whiteancient
Copy link

What is affected?

Component

Description

The hour-selector in an input with type="datetime-local" and step="1" does not allow to write a 2 digit number with the keyboard.

Reproduction

Here is a Gist that does not work.
https://lit.dev/playground/#gist=3eedd3e52aa191e027d059e26869ff5e

I does work for some users, but not all. I have customers complaining about the behavior.

hours_00_2x

Workaround

The workaround is to use the keyboard up/down to change the digit to its right value

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

Current

Browser/OS/Node environment

Browser: Chrome and Edge
OS: Windows

@asyncLiz
Copy link
Collaborator

asyncLiz commented Sep 9, 2024

What timezone and locale are you in that is giving the unexpected behavior?

Entering in "October 10, 2025 @ 10:10:10am" works for me, but I'm in GMT-7 on en-US, so my inputs take a different format.

Screenshot 2024-09-09 at 9 09 14 AM

I don't see an am/pm section in your input, so I think it may be a different 24-hour locale that behaves differently.

@whiteancient
Copy link
Author

whiteancient commented Sep 11, 2024

I am in Sweden with sv-SE as my locale., Timezone right now is GMT+2 here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants