Is it possible to add validations/restrictions to date element using HTML api,without jquery?
I am currently using jquery datePicker to display calendar,and for adding restrictions using the beforeShow method of the datePicker.
Now i am trying to use the HTML5 calender and want to know how to add restrictions(eg:disable weendends/holidays) to the HTML5 calendar.
Can somebody point me in right direction?
You can use
minandmaxattributes 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/