<DatePicker fixOnBlur={false} allowFreeInput minDate={...} /> should not set the min/max date #1489
kevinbeal
started this conversation in
Feature requests
Replies: 1 comment 5 replies
-
I do not understand the issue, can you provide an example of user input and result value? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When you set a
minDate
and haveallowFreeInput
it will set the date to theminDate
when the value is before that date. The same behavior works in the other direction formaxDate
. This makes sense and is a good feature (thank you).My assumption was when setting the
fixOnBlur
prop tofalse
that this behavior would be canceled. My assumption was incorrect and it only stops making an invalid date into the last valid one. I can imagine there is a good reason for this, and am open to counter argument, but I think it should work as it currently does but with the addition of stopping the min/max date value change as well."Fix" in my mind sounds like "make into a value the input will accept as valid". From that perspective, changing the date to the min date when before it is a "fix". So,
fixOnBlur={false}
should then also stop setting it to theminDate
.Of course, this is just my opinion, but in the snippet below, the condition on line 197 should be
allowFreeInput && fixOnBlur
.Beta Was this translation helpful? Give feedback.
All reactions