[英]Bootstrap datetimepicker does not firing change event on time change
我仅使用时间输入(此链接上提供了“自定义格式”示例3) http://eonasdan.github.io/bootstrap-datetimepicker/
我只想听用户单击向上或向下更改小时或分钟时的时间变化。 我尝试过change.dp
, change
和dp.change
但是没有一个工作
<div class='input-group date' id='datetimepicker3'>
<input type='text' class="form-control" id="start_time"/>
<input type="hidden" name="book_meeting[start_date]" id="book_meeting_start_date" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-time"></span>
</span>
</div>
$("#start_time").on("change", function(e) {
alert("helloi");
});
$("#book_meeting_start_date").on("change", function(e) {
alert("helloi");
});
$("#book_meeting_start_date").on("change.dp", function(e) {
alert("helloi");
});
搜索后,我找到了它的答案。我最终使用了dp.hide,它按预期工作。
$('#datetimepicker3').datetimepicker({
stepping: 5,
format: 'HH:mm'
}).on('dp.hide', function (event) {
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.