【发布时间】:2015-10-05 12:37:29
【问题描述】:
我的引导日期时间选择器有以下 html。我想禁用<input> 并强制用户使用日期时间选择器。我试过使用disabled 和readonly="readonly" 属性。但是添加属性后,我的 datetimepicker 不起作用。有什么建议吗?
<div class='input-group date' id='startDate'>
<input type='text' class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
$('#startDate').datetimepicker({
format: "YYYY-MM-DD",
useCurrent: true,
viewMode: "days"
});
【问题讨论】:
-
你用的是什么插件?在这里工作正常:jsfiddle.net/IrvinDominin/hz6xuu0o
标签: javascript html twitter-bootstrap