-
Notifications
You must be signed in to change notification settings - Fork 102
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 doesn't work with minDate and maxDate #308
Comments
I'm having the same issue, when using Max Min date the onChange does not fire. I am using the time selector along with the calendar. I have the minDate set to now - 31 days. and the maxDate set to now. if I select an hour less than the current hour and then select the minimum date the time selector is frozen I have to change the date to more than the minimum in order to change the time. If the onchange fired as I would have expected I can then compare the time and set it to the current time and apply this to the minimum date time value. Hope this makes sense |
my current solution was adding this code inside the datepicker props, (i have trouble when selecting monthpicker, with minDate, if the month is same as the minDate somehow the bug appears) which fixed in this code below
|
set minDate to start of the day, and maxDate to end of the day resolved this issue, example:
|
i'm building a custom form and i need to validate the user input when typing the date as well as when selecting.
the problem i'm facing is that the onChange function doesn't work when typing if i provide a minDate and a maxDate.
if i remove the minDate and maxDate props and type the date the onChange works.
the onChange only works when the user input is within the min and max range.
The text was updated successfully, but these errors were encountered: