I am using Bootstrap 3 DateTimePicker and I am trying example 8 (Linked datetimepicker).
Javascript
$('#dpStart').datetimepicker({ pickDate: true, //en/disables the date picker pickTime: false, format: "DD-MM-YYYY", useMinutes: false, //en/disables the minutes picker useSeconds: false }); $('#dpEnd').datetimepicker({ pickDate: true, //en/disables the date picker pickTime: false, format: "DD-MM-YYYY", useMinutes: false, //en/disables the minutes picker useSeconds: false }); $("#dpStart").on("dp.change", function(e) { alert('hey'); $('#dpEnd').data("DateTimePicker").setMinDate(e.date); }); $("#dpEnd").on("dp.change", function(e) { $('#dpStart').data("DateTimePicker").setMaxDate(e.date); });
HTML
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.