jonthornton/Datepair.js

Times not syncing correctly

Closed this issue · 1 comments

Fiddle http://jsfiddle.net/6at417bv/

  1. Open modal
  2. Select 7:00 AM [end time is +4hrs 11:00 AM perfect]
  3. Change end time to 12:00 PM [Works. great.]
  4. Change start time to 6:00 AM [Not great. end time changes to 11:00 AM. Why? It's not 4 hrs, even if it was, it shouldn't change it if both times are already set. My users are getting frustrated.]
  5. Change it back to 7:00 AM [end time goes to 12:00 PM that's 5 hrs, but again, it shouldn't change]

Hope this makes sense.

Yes, it happens only when anchor is set to start time. By default the anchor is always set to start time. However, you can easily change it to end time or null(in case you don't want the anchor). Check the end of this page...

Official DatePair.js

It contains, how to use Anchor example.