I have one little problem with HTML5.
<input type="date" id="birthday" />
I want check this field in JavaScript.
Min. value - 01-01-1990.
I have no idea how to parse the date object and check that is correct.
Attribute min and max in HTML5 is not working. I must write validation in JavaScript.
You can use a JavaScript validation library, which uses the HTML5 input attributes like min and max: for example jQuery Validation:
Have a look as this fiddle for a working example: http://jsfiddle.net/a5Mvt/1/
In addition you might want to use a library like Modernizr to check for browser support of
input[type="date"]
and use a datepicker control from jQuery UI or something similar, if it is not supported.Update: Here's a version, that doesn't use jQuery or any other additional library:
Updated fiddle: http://jsfiddle.net/a5Mvt/2/