jonthornton / Datepair.js

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

Date rollover doesn't match duration. #24

Closed danielsmacdonald closed 10 years ago

danielsmacdonald commented 10 years ago

I'm not sure if this is a problem with the duration hints (xx hours text in the timepicker when < 24 hour time range) or with rollover.

Steps: -select a start date -select start time: 11:30pm (end date will rollover here) -select end time: 11:30pm (end date doesn't rollback here!)

This wouldn't be too bad but the duration hint for the last step shows 0 mins and it ends up being 24hours since the date doesn't rollback.

Fiddle: http://jsfiddle.net/slicedtoad/uzdbnzwo/1/