Skip to content

Instantly share code, notes, and snippets.

@mountainash
Created June 19, 2017 21:18
Show Gist options
  • Save mountainash/c9b4611fbbd56d1cd638c6c7a7bd3983 to your computer and use it in GitHub Desktop.
Save mountainash/c9b4611fbbd56d1cd638c6c7a7bd3983 to your computer and use it in GitHub Desktop.
HTML5 Date Field
<input type="date" name="date" id="date" pattern="(?:(?:0[1-9]|1[0-2])[\/\\-. ]?(?:0[1-9]|[12][0-9])|(?:(?:0[13-9]|1[0-2])[\/\\-. ]?30)|(?:(?:0[13578]|1[02])[\/\\-. ]?31))[\/\\-. ]?(?:19|20)[0-9]{2}" placeholder="MM/DD/YYYY" required>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment