IE Input Type Date not displaying date Date picker

I use the DATE input type in my HTML and everything works fine in Chrome and Firefox, but IE does not display the date picker.

When I use jQuery Datepicker, I get two date picker dialogs in Chrome and Firefox.

How can I fix the functionality where I can have a date input type and only one popup for my form?

+6
source share
1 answer

You need to use polyfill so that the DATE input type has consistent behavior across all browsers. You can use this webshim as a polyfill.

DATE - HTML5, . HTML5, ( IE), :

  • Polyfills

- , HTML5 . Modernizr. modernizr, , - , , javascript, . Polyfills.

, IE 10, jqueryui.com .

Modernizr.load({
    test: Modernizr.inputtypes.date,
    nope: "js/jquery-ui.custom.js",
    callback: function() {
      $("input[type=date]").datepicker();
    }
  });

Modernizr , , nope, , , , , - , .

+15

All Articles