react-semantic-ui-datepickers icon indicating copy to clipboard operation
react-semantic-ui-datepickers copied to clipboard

maxDate and minDate not enforced when date entered manually

Open CarlosNZ opened this issue 1 year ago • 0 comments

🐛 bug report

Description of the problem

If you type a date in via text input, there is no check for ensuring it respects the maxDate and minDate props.

How has this issue affected you? What are you trying to accomplish?

I can't rely on the max/min Date props to enforce a range if the user can override it with text input.

I'm not sure what the correct behaviour should be, perhaps onBlur it checks the input and if it's outside the max/min specifications, change the text input to the smallest/largest allowable value?

Or, probably better, just remove the input completely, the way it does when you type an invalid date?

CarlosNZ avatar Jun 23 '23 11:06 CarlosNZ