Bootstrap 3 datetimepicker events not firing up

风流意气都作罢 提交于 2019-11-28 07:09:46

This may seem silly, but did you check you're using the same bootstrap-datetimepicker.js plugin that you're referring to in your question?

There are two versions I know of which are very similar:

  1. The version you provided in your question: http://eonasdan.github.io/bootstrap-datetimepicker/
  2. A slightly different version: http://www.eyecon.ro/bootstrap-datepicker/

The first version responds to change.dp, while the second version responds to dp.change.

Just check the comments at the top of the bootstrap-datetimepicker.js to see which one you're using.

da Rocha Pires

Check if you are loading moment.js before loading datetimepicker.js

Tempus Dominus (self-defined as the successor to the very popular Eonasdan/bootstrap-datetimepicker) seems to have changed event to change.datetimepicker.

I am using bootstrap datetime picker. After doing lots of research, below code works for me:

$('.data_date_of_birth').on('changeDate', function(event) {
  alert($(this).val());
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!