I have a line of code shown below.
<input type='date' min='2022-01-01'></input>
Is there a way I can set the minimum date to ‘today’ using JavaScript, such that any date before today’s date won’t be valid?
>Solution :
document.getElementById("date").min = new Date().toISOString().split("T")[0];
<input id="date" type='date'></input>