Modernizr:未能在Firefox上的日期输入上执行datetime()

Lee*_*ley 5 javascript firefox jquery modernizr

我正在使用Modernizr并且无法获取jquery UI日期选择器以在FireFox中原生显示html5日期输入.

这个小提示显示我的意思 - 在FireFox中打开它在Firefox中 打开时我只是得到一个文本输入 http://jsfiddle.net/Te2yL/

码:

<head>
     //Include Modernizr - all items are included (full-fat version)
     <script src="assets/js/vendor/modernizr.js"></script>
</head>

<body>
     <input 
         type="date" 
         id="start-date"  
         ng-model="someVariable" 
         format-date 
         class="form-control date" 
     />

     <script>

    Modernizr.load({
        test: Modernizr.inputtypes.date,
        nope: ['https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.22/jquery-ui.min.js',
        'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.22/themes/smoothness/jquery-ui.css'
        ],
        complete: function () {
            $('input[type=date]').datepicker({
                dateFormat: 'yy-mm-dd'
            });                 
        }
    });

</script>

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

要确认,在FireFox中打开时,会下载Jquery-ui js&css.

我仍然在浏览器中显示文本输入 - 它的类型在检查DOM时仍然是'日期'.

我错过了什么吗?

非常感谢