News for hackers. Stuff that matters.
Re:Pickadate.js by ville on Tuesday November 20, 2012 @06:08PM (#4811881)
Support for input type="date" can be tested by creating an element like that and checking the type attribute. But how can you tell if the browser has support for the native picker? You can't. That is why this picker takes the approach of changing the type date always to text to prevent double date pickers.
Re:Pickadate.js by petercooper on Tuesday November 20, 2012 @07:01PM (#4812025)
But how can you tell if the browser has support for the native picker? You can't.

That's what I was wondering. If there were a way, it'd be pretty awesome to use a library like this as a polyfill rather than as a separate thing you attach to text inputs.

Re:Pickadate.js by leh0n on Tuesday November 20, 2012 @08:47PM (#4812362)
You can. Modernizr will tell you if the browser supports the native picker. http://modernizr.com/
Re:Pickadate.js by ville on Wednesday November 21, 2012 @04:34PM (#4816418)
It doesn't tell that. From Modernizr wiki[0]: "webforms UI: datepicker, colorpicker UIs cannot be detected, only the associated constraint validation"

[0]: https://github.com/Modernizr/Modernizr/wiki/Undetectables