本文介绍了eonasdan DateTimePicker自动关闭不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我删除了自动关闭功能,则可以正常工作。如何自动关闭datetimepicker。我一直在搜索,但是找不到有用的信息。
If I removed the autoclose it works fine. How to autoclose datetimepicker. I've been searching on this but couldn't find useful information.
$('#start_schedule').datetimepicker({
format: 'HH:mm',
autoclose: true
});
推荐答案
根据文档,它实际上不起作用。如果您将使用 showClose:true
,它将无法识别,您将收到一个错误消息。除了在文档中使用此代码外,没有其他方法。希望有帮助。
It doesn't work actually according to documentation. If you will use showClose: true
, it won't recognize, you will get an error. There is no other way rather than using this code in the docs. Hope this help.
<div class="container">
<div class="row">
<div class='col-sm-6'>
<div class="form-group">
<div class='input-group date' id='datetimepicker3'>
<input type='text' class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-time"></span>
</span>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$('#datetimepicker3').datetimepicker({
format: 'LT'
});
});
</script>
</div>
</div>
这篇关于eonasdan DateTimePicker自动关闭不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!