jonthornton / Datepair.js

A javascript plugin for intelligently selecting date and time ranges, inspired by Google Calendar.
https://www.jonthornton.com/Datepair.js
358 stars 87 forks source link

Duration does not show up or update when setting time through code #63

Closed isupersid closed 8 years ago

isupersid commented 8 years ago

Hi,

Please look at the following jsfiddle for the repro of the issue: http://jsfiddle.net/2gvnwnwy/4/

With the changes mentioned in the reply to #62 , the dates show up highlighted on the calendar. However notice that durations do not update in the second time text box when advancing time through code.

Here are the repro steps:

  1. Run the fiddle
  2. Click and select a different time field in the second time field. -- This will get duration to show up.
  3. Click the 'advance time' button.
  4. Now click on the second time field again to see that the duration being calculated from the previous time in the first time field.

Expected: The duration should be computed from the current time in first time field.

Snapshot: image