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

maxDate and minDate not enforced when date entered manually #861

Open
CarlosNZ opened this issue Jun 23, 2023 · 0 comments
Open

maxDate and minDate not enforced when date entered manually #861

CarlosNZ opened this issue Jun 23, 2023 · 0 comments

Comments

@CarlosNZ
Copy link

CarlosNZ commented Jun 23, 2023

🐛 bug report

Description of the problem

If you type a date in via text input, there is no check for ensuring it respects the maxDate and minDate props.

How has this issue affected you? What are you trying to accomplish?

I can't rely on the max/min Date props to enforce a range if the user can override it with text input.

I'm not sure what the correct behaviour should be, perhaps onBlur it checks the input and if it's outside the max/min specifications, change the text input to the smallest/largest allowable value?

Or, probably better, just remove the input completely, the way it does when you type an invalid date?

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

1 participant