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

OnChange does not correctly capture invalid minutes value when re entered #130

Closed
mikeghealth opened this issue Nov 23, 2021 · 4 comments
Closed
Labels
question Further information is requested stale

Comments

@mikeghealth
Copy link

STR:

  1. enter a time with invalid minutes say '08:88 AM' everything is fine as onChange does not trigger when it is invalid in this case
  2. however click on minutes section and enter '77' all of a sudden onChange triggers and now the time says it's '08:07' a valid time, but not what the user entered. This causes a seemingly invalid time, to pass validation

Please see attached, me entering a valid time, then re entering an invalid time and having it show up as just the first digit. e.g. '08:77" becomes '08:07'

time-picker-onChange-issue.mov
@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 Feb 28, 2022
@github-actions
Copy link
Contributor

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

@wojtekmaj
Copy link
Owner

Before an invalid value "77" was entered, a perfectly valid "7" must have been entered first. As the last valid value, 8:07 gets accepted here.

@wojtekmaj wojtekmaj added the question Further information is requested label Mar 18, 2022
@Roman-ZN
Copy link

Roman-ZN commented Jan 27, 2023

Hello @wojtekmaj
Thank you for this great lib. However, looks like this is a bug. We need to have the ability to override invalid values, for example, if the user enters 66 minutes, the system should be able to override to 06, as it implemented in input type="time".
At this moment we just have difference between what we have in state and what we display.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested stale
Projects
None yet
Development

No branches or pull requests

3 participants