-1

組件日曆只顯示時間選擇:only timer..calender not showing.img的DateTimePicker不顯示只是時間選擇器

 
.form-group 
    label.col-xs-5.control-label test field 
    .col-xs-5 
     #fromDate.input-group.date 
     input.form-control(type='text') 
      span.input-group-addon 
      span.glyphicon.glyphicon-calendar 
$(function() { 
    $('#fromDate').datetimepicker({ 
    sideBySide: true, 
    locale:'en-ca' 
    }); 
}) 

日曆爲什麼沒有顯示?

+0

你有自定義CSS,影響的DateTimePicker?該組件具有['debug'](https://eonasdan.github.io/bootstrap-datetimepicker/Options/#debug)選項,如果將其設置爲「true」,則可以檢查datetimepicker部件並進一步調查。 – VincenzoC

回答

1

好像你正在使用eonasdan-datetimepicker

我抄你的模板,這是工作,因爲它應該。

Fiddle

HTML

<div class="form-group"> 
    <label class='label col-xs-5 control-label test field'></label> 
    <div class="col-xs-5"> 
    <div class='input-group date' id='myDatepicker'> 
     <input type='text' class="form-control" /> 
     <span class="input-group-addon"> 
    <span class="glyphicon glyphicon-calendar"></span> 
     </span> 
    </div> 
    </div> 
</div> 

JS代碼

$('#myDatepicker').datetimepicker({ 
    sideBySide: true, 
    locale: 'en-ca' 
}); 
相關問題