afialapis / reactstrap-date-picker

A Reactstrap based, zero dependencies, date picker
MIT License
12 stars 6 forks source link

Validation on keyboard input #16

Closed airguru closed 3 years ago

airguru commented 3 years ago

When I change the datepicker value to one that is outside minDate and maxDate bounds by typing it on the keyboard, nothing significant happens. I would imagine the is-valid or is-invalid class could be applied automatically, or at least the onChange callback should not fire. Is this just not implemented or am I missing something?

afialapis commented 3 years ago

If from the popup picker we do not allow to choose out of bounds dates, makes no sense to do it from the keyboard. Fixed, now the original value will be restored in that case. is-valid / is-invalid classes are handled from props.valid / props.invalid, so out of this issue's scope. Thanks!