簡體   English   中英

日期選擇器在Internet Explorer中不起作用

[英]Date picker is not working in Internet Explorer

<div class="bootstrap-datepicker">
    <label class="col-sm-3 control-label" for="inputname"> Date</label>
        <div class="input-group date">
            <input type="text" name="date" id="date" class="form-control pull-right datepicker" id="datepicker" value="">
            <div class="input-group-addon">
                <i class="fa fa-calendar"></i>
            </div>  
        </div>
</div>  
<div class="bootstrap-timepicker">
    <label class="col-sm-3 control-label" for="time">Time</label>
        <div class="input-group">
            <input type="text" name="time" id="time" class="form-control timepicker" value="">
            <div class="input-group-addon">
                <i class="fa fa-clock-o"></i>
            </div>
        </div>
</div>

我添加的腳本是:

 $(function () {
   $('.datepicker').datepicker({
    autoclose: true,
    format:'dd-mm-yyyy'
  });
  $('.timepicker').timepicker({
    showInputs: false
  });
});

包含腳本文件

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

並且在Chrome和Firefox中運行良好,但它無法在Internet Explorer中運行。 請幫我解決一下這個。

你可以嘗試這樣: -

 $("input.pickerClass").datepicker(); 

看一下這個

 $('#inputboxid').datepicker({
       showOn: "button",
       onSelect: function()
       {
         // this will execute
         $(this).change();
       }
    });

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM