I am trying to set the minTime
my End Time timepicker
based on what I chose at the start timepicker
.
I have this, based on something that works for a regular datepicker
, but it doesn't work.
$('#confirmed_time_start').timepicker({ timeFormat: 'hh:mm', stepHour: 1, stepMinute: 15, hour: 8, minute: 0, hourMin: 8, hourMax: 18, onSelect: function(timeStr) { var newTime = $(this).timepicker('getDate'); if (newTime) { // Not null newTime.setDate(newTime.getDate()); } $('#confirmed_time_end').timepicker('minTime', newTime) } }); $('#confirmed_time_end').timepicker({ timeFormat: 'hh:mm', stepHour: 1, stepMinute: 15, hour: 8, minute: 0, hourMin: 8, hourMax: 18 });
The error I am getting is:
The object does not support this property or method.
source share