How to add validation/restrictions for HTML5 date field without jquery/javascript

Solution 1:

You can use min and max attributes on your date input.

Spec : http://www.w3.org/TR/html-markup/input.date.html

Edit :

  • Afaik, there is no way to disable specific days using HTML5 date input...

  • If you want to be cross-browser, use Modernizr and provide a fallback for old browsers (for example jQuery datePicker) : http://net.tutsplus.com/tutorials/html-css-techniques/how-to-build-cross-browser-html5-forms/