-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Feature request: Add prop to nullify value when invalid #13
Comments
Closer to native behavior would be to prevent the invalid values altogether, and this is the direction I'd like to go in with this package, but your suggestion is something that would certainly come useful to a lot of people, thanks! |
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. |
This issue was closed because it has been stalled for 14 days with no activity. |
Hello, thanks so much for your work with react-time-picker :)
I'm running in a situation where when the user inputs an invalid time (for example: 1:80 am), the minute input appears red, but my wrapping form receives the valid time of 1:08 am (the last valid time which triggered the onChange function) behind the scenes.
I understand calling onChange only on valid times is the current desired behavior, but I think a prop to nullify the whole value on invalid dates would be useful. Let me know if I can help out.
Ive seen on other issues that you're adding the option for listeners. I think that's a good idea, but still, I think a prop to nullify invalid times (returning null like when erasing time) would be useful even if listeners exist.
The text was updated successfully, but these errors were encountered: