BootStrap timer picker时间改变后触发事件


<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link rel="stylesheet"
  href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/css/bootstrap-datetimepicker.min.css" />

<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

<script
  src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"></script>
<script>

  $(function () {
    $('#pickTime').datetimepicker({
      ignoreReadonly: true,
      format: 'LT'
    }).on('dp.change', function (e) {
      //处理代码
    });
  });
</script>
<div class="col-md-4" id="divpickTime">
  <div class="form-group">
    <input type="text" id="pickTime" readonly="readonly" class="form-control" onchange="change()" />
  </div>
</div>

你可能感兴趣的:(BootStrap timer picker时间改变后触发事件)