Javascript Form How to - Block a set of dates in a date input by min max value








Question

We would like to know how to block a set of dates in a date input by min max value.

Answer


<!DOCTYPE html>
<html>
<head>
</head>
<body>
  <input id="startdate" name="startdate" min="2012-01-01"
    max="2013-01-01" type="date">
</body>
</html>

The code above is rendered as follows: