Jquery Modernizr datepicker
datepicker, html, javascript, jquery, modernizr
Solution
Add this to your html.
<input type="date"/>
You have datepicker based on an `<input>` element.
$('input[type=date]').datepicker({
dateFormat: 'yy-mm-dd'
});
Fiddle Demo
Fiddle Without Modernizr
- Include the `<script>` tag with Modernizr code, in the `<head>` tag.
- And for implementing DatePicker you should include jQuery UI reference.
Note :
Modernizr cannot detect that date inputs create a datepicker, its design, the color input create a colorpicker, and so on; it will detect that the input values are sanitized based on the spec.
Problem
I downloaded modernizr.js from it's website. ``` <html> <head> <title>Hello Modernizr</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="~/modernizr.custom.62854.js"></script> </head> <body> </body> </html> <script> Modernizr.load({ test: Modernizr.inputtypes.date, nope: ['http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js', 'jquery-ui.css'], complete: function () { $('input[type=date]').datepicker({ dateFormat: 'yy-mm-dd' }); } }); </script> ``` I added a datepicker but if i run website , i can not see anything where i miss ?