Closed isupersid closed 8 years ago
notice that the days aren't highlighted on the calendar
That's the red flag. Datepair gets the date values from the datepicker. If the datepicker isn't showing the correct value, Datepair isn't going to work.
Use the datepicker/timepicker update methods instead of $.val()
:
function updateDateTime(fromDate, fromTime, untilTime, untilDate) {
if (fromDate) {
fromDateField.val(fromDate.format('MM/DD/YYYY'));
}
if (untilDate) {
untilDateField.datepicker('update', untilDate.format('MM/DD/YYYY'));
}
if (fromTime) {
fromTimeField.timepicker('setTime', fromTime.format('h:mma'));
}
if (untilTime) {
untilTimeField.timepicker('setTime', untilTime.format('h:mma'));
}
datepair.refresh();
}```
Opened related issue #63 about duration not showing up correctly.
Hi,
Here is the jsfiddle for this issue: http://jsfiddle.net/2gvnwnwy/3/
There are really 2 problems here but I am concerned with the duration not showing up right now.
Expected: The duration should update when programmatically advancing time.