pickaDate:false在datetimepicker bootstrap中不起作用?

时间:2014-08-15 05:48:01

标签: jquery twitter-bootstrap datetimepicker

为什么pickDate: false无法在datetimepicker引导程序中运行?

HTML

<input type="text" class="form-control input-small evstime" name="evstime" readonly="readonly" />  

JS

$(function() {
    $('.evstime').datetimepicker({
      pickDate: false 
    });
});     

1 个答案:

答案 0 :(得分:1)

您使用此http://tarruda.github.io/bootstrap-datetimepicker/#disables_date_picker吗?

HTML

<div class="input-append datetimepicker">
    <input type="text" data-format="hh:mm:ss" class="evstime" name="evstime"/>
    <span class="add-on">
        <i data-time-icon="icon-time"></i>
    </span>
</div>  

JS

$(function() {
    $('.datetimepicker').datetimepicker({
      pickDate: false 
    });
});   

查看这个js fiddle http://jsfiddle.net/zxhgnq9b/