HTML5 Date picker with fallback

When using the dateicker in HTML5 there needs to be a fall-back method.

<form>
<input type="date">
</form>

<script>
var i = document.createElement("input");
i.setAttribute("type", "date");
if (i.type == "text") {
// No native date picker support :(
// Use Dojo/jQueryUI/YUI/Closure to create one,
// then dynamically replace that <input> element.
}
</script>

About Keiron

Web Developer based in the UK. Click here if you want to work with me