2017-04-14 29 views
0

我使用的Bootstarp主題sb-admin2,我有輸入日期控件在Chrome中工作,但不是在Firefox中,問題是輸入日期控件使用jQuery 1.10版本和引導使用JQuery 3版本我用在javascript下面的代碼,帶來的日期控制在Firefox,但不能打開日期選擇器,使用Bootstrap的Firefox上的DatePicker 3

webshims.setOptions('waitReady', false);  
    webshims.setOptions('forms-ext', { types: 'date' }); 
    webshims.polyfill('forms forms-ext'); 

但是我試圖設置

var j = $.noConflict(); 

但這不工作要麼。

+2

提供你在哪裏初始化的日期選擇器的HTML和JS代碼。 – 2017-04-14 10:34:32

+0

html代碼'' –

+0

在主頁面使用腳本'<! - jQuery - > <! - Bootstrap Core JavaScript - > <! - 自定義主題的JavaScript - >

回答

0

這對兩個瀏覽器都有效。

<!--DatePicker --> 
 
<script src="https://code.jquery.com/jquery-1.10.0.js"></script> 
 
<script src="https://afarkas.github.io/webshim/js-webshim/minified/polyfiller.js"></script> 
 
<script> 
 
    
 
webshims.polyfill('forms forms-ext'); 
 
</script> 
 
<html> 
 
<input type="date" id="dtDateFrom" style="Width:150px;" class="form-control"/> 
 
</html>