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

Feature request: Add prop to nullify value when invalid #13

Closed
fbrcc opened this issue Oct 18, 2018 · 3 comments
Closed

Feature request: Add prop to nullify value when invalid #13

fbrcc opened this issue Oct 18, 2018 · 3 comments
Labels
enhancement New feature or request stale

Comments

@fbrcc
Copy link

fbrcc commented Oct 18, 2018

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.

@wojtekmaj wojtekmaj added the enhancement New feature or request label Oct 21, 2018
@wojtekmaj
Copy link
Owner

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!

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2021

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 Oct 4, 2021
@github-actions
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

2 participants