Bootstrap 3 datetimepicker events not firing up

writeToBhuwan picture writeToBhuwan · Mar 19, 2014 · Viewed 79.9k times · Source

I am using Bootstrap 3 DateTimePicker and I am trying example 8 (Linked datetimepicker).

Calender is showing as per the needs but the events like dp.change, dp.hide, dp.show are not firing up.. What could be the problem? Any help?

EDIT: Please note that I've included all necessary files like Bootstrap js, bootstrap css, Moment.js and datetimepicker js and css files.

Answer

itsmejodie picture itsmejodie · Apr 3, 2014

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.