I’ve just been through Mark Pilgrim’s post on html5 form widgets here:
http://diveintohtml5.ep.io/forms.html
He implies that these elements should be adopted because they fallback to input=text. However on an (admittedly brief) test, it strikes me the behaviour of the date input, at least in safari, is actually inferior to a straight text input validated on the server.
Any views on this?
As pointed out in your article, and the comments, there is no reason not to use this input type.
For browsers that do not support
type="date", the attribute will be ignored, and the field will render astype="text", as that is the default.You will want to validate that date server-side. Remember: Anyone can post anything to your scripts.
You can still validate the data client-side. There are methods for detecting HTML5 form support here: http://nicolahibbert.com/html5-forms-support-detection-javascript/