-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Date Input] minDate/maxDate doesn't work outside of default range #980
Comments
this is related to #977 (converting validation errors to warnings) but probably needs some design thinking for how we handle dates outside of the valid window. |
I cannot reproduce this in the docs DateInput example. renders as expected, no errors and correct date ranges: const MAX = new Date(2020, 5, 5);
const MIN = new Date(1990, 5, 5);
<DateInput {...this.state} value={new Date(2019, 4, 20)} maxDate={MAX} minDate={MIN} /> also tried with @jchomicki would you be able to share the exact code you use to create the |
aha the issue is in how @mfedderly implemented the |
The problem still exist when user types the date manually. I use default value of minDate and when user types: and next number crashes whole page. I using the latest react and blueprintjs (checking for updates like every day :D) |
I have the same issue |
Why was this closed? @giladgray |
@TheAifam5 @silviodeligios @patrickk it was closed for reasons similar to this: #3407 (comment) we can continue discussion in #3861 if you'd like |
Bug report
Steps to reproduce
maxDate={new Date(2020, 5, 5)}
andminDate={new Date(1990, 5, 5)}
2019-04-20
Actual behavior
Dropdown fails to open or is disabled and an error is thrown in the console:
Expected behavior
Setting the min/maxDate outside of the default 20 year window should be allowed.
The text was updated successfully, but these errors were encountered: