jquery ui with bootstrap styling

by Richard Hunter

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-ui-bootstrap/0.5pre/assets/css/bootstrap.min.css">
based on:
<a href="http://webdevhub.co.uk/native-html5-datepicker-with-a-javascript-fallback/">datepicker with IE fallback</a>

<form action="#">
    <input id="date" type='text' name='foo' />
</form>

JavaScript

var el = document.createElement('input');
    el.setAttribute('type', 'date');
    //if type is text then and only then should you call the fallback
    //if(el.type === 'text'){
    $('#date').datepicker({
        dateFormat: 'dd-mm-yy'
    });
    // }