Skip to content

maxDate and minDate not enforced when date entered manually #861

Open
@CarlosNZ

Description

@CarlosNZ

🐛 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions