HTML5 Date Input Type Interfering with jQuery Datepicker

前端 未结 4 1489
孤街浪徒
孤街浪徒 2020-12-08 22:14

I am using the jQuery UI\'s datepicker for date selections on my site. One of my users just upgraded to the newest version of Chrome, which has built-in native date picker f

4条回答
  •  渐次进展
    2020-12-08 22:45

    Use Modernizr or similar library to feature detect if the browser supports the input type=date, and then load the jQuery UI datepicker if if does not.

    if (!Modernizr.inputtypes.date) {
        $('input[type=date]').datepicker();
    }
    

提交回复
热议问题