I'm not sure if I'm doing something wrong, but I'm basically trying to make it so that a second calendar starts after the first one ends, and the timing is off by 8 hours (UTC/GMT inconsistency). Basically, it allows the second calendar to have date-times that come 8 hours before the first calendar's:
var pickup = $('#pickup').datetimepicker({
showMeridian: true,
format: 'yyyy-mm-dd H:ii P',
minuteStep: 15,
autoclose: true
}).on('changeDate', function(ev) {
var newDate = new Date(ev.date);
newDate.setDate(newDate.getDate());
dropoff.datetimepicker('setStartDate', newDate);
$('#dropoff').focus();
});
var dropoff = $('#dropoff').datetimepicker({
showMeridian: true,
format: 'yyyy-mm-dd H:ii P',
minuteStep: 15,
autoclose: true
});
Anyone know how to resolve this issue--I want everything relative to each other. Calling .date should return the value that the user sees (which is considered UTC currently), not the UTC-8 version as it does currently.