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

Can't enter 12 or 0 for hours when AM is selected #147

Closed
johnhyde opened this issue Apr 7, 2021 · 3 comments
Closed

Can't enter 12 or 0 for hours when AM is selected #147

johnhyde opened this issue Apr 7, 2021 · 3 comments
Labels

Comments

@johnhyde
Copy link

johnhyde commented Apr 7, 2021

I'm using useState to get selectedDate and setSelectedDate and passing them to value and onChange. I'm using 12-hour time. When AM/PM is set to AM, I cannot type 0 or 12 into the hours field. If I type 0, the field will just be empty and display the placeholder. If I type 12, the field empties when I enter the 2 and it displays the placeholder. In both cases, onChange is not called when the field clears itself.

If I set the time to 12PM and then switch to AM, it works fine, but if it's already set to AM it doesn't work. If I unhide the native datetime picker I have a similar issue typing in there. But if I use the dropdown and select 12am it works fine.

I tried testing this out with just react-time-picker and I didn't run into this issue.

@johnhyde
Copy link
Author

I've made a PR for react-time-picker which fixes this: wojtekmaj/react-time-picker#116

@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

@github-actions github-actions bot added the stale label Dec 12, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2023

This issue was closed because it has been stalled for 14 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant