-
-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Labels
Description
Before you start - checklist
- I followed instructions in documentation written for my React-Date-Picker version
- I have checked if this bug is not already reported
Description
When using minDate/maxDate and manually typing in the value for month/day/year, onInvalidChange will get called yet the value of the input shown is valid.
Steps to reproduce
- Go to https://codesandbox.io/p/sandbox/jovial-ioana-srq44p
- Set the date to the latest valid date
- Select the day input and type in a day ahead to make the date invalid
- Notice that the input auto corrects itself to a valid day but the onInvalidChange callback gets called resulting in an incorrect error message
Expected behavior
onInvalidChange should only call when the resulting value is invalid
Actual behavior
onInvalidChange gets called when the resulting value is valid
Additional information
No response
Environment
Chrome 138.0.7204.170
v11.0.0 of react-date-picker