Input Type: Date Restricted

With some browsers, you can put a restriction on the date input type:

HTML file: Displayed by browser:
<form action="http://www.w3schools.com/html/action_page.php">
  Enter a date before 1980-01-01:
  <input type="date" name="bday" max="1979-12-31"><br /><br />
  Enter a date after 2000-01-01:
  <input type="date" name="bday" min="2000-01-02"><br /><br />
  <input type="submit">
</form>
Enter a date before 1980-01-01:

Enter a date after 2000-01-01:

Chrome, Safari and Opera browsers can display this HTML form correctly. It is not yet (as of September 2015) supported by Internet Explorer nor Firefox.

Back button Table of Contents Next button