简体   繁体   English

eonasdan DateTimePicker自动关闭不起作用

[英]eonasdan DateTimePicker autoclose doesn't work

If I removed the autoclose it works fine. 如果我删除了自动关闭功能,则可以正常工作。 How to autoclose datetimepicker. 如何自动关闭datetimepicker。 I've been searching on this but couldn't find useful information. 我一直在搜索,但是找不到有用的信息。

$('#start_schedule').datetimepicker({
        format: 'HH:mm',
        autoclose: true

    });

It doesn't work actually according to documentation. 根据文档,它实际上不起作用。 If you will use showClose: true , it won't recognize, you will get an error. 如果您将使用showClose: true ,它将无法识别,则会出现错误。 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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM