[Fixed] Disable dates in angular

Issue

I’m working with calendar in angular with start and end dates.
I want to disable the previous dates , while selecting a start date and an end date.

<input type = "date"/>

Please help me achieve this functionality.

Thanks in advance.

Solution

You can use max and min property of the input tag

Eg: <input type="date" min="2020-01-01" max="2020-03-31">

the format for min and max is in case of date input is YYYY-MM-DD

Leave a Reply

(*) Required, Your email will not be published