-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timepicker duration is incorrect when using 11:00 PM #769
Comments
If you change line 65 in your jsfiddle to |
Unfortunately, removing the +1 does introduces a different issue then. One of our requirements is that the same timestamp equates to a 24 hour duration when placed in the start time and end time (i.e.: 12AM - 12AM). Removing the + 1 from that line keeps the same timestamp at the top of the dropdown with a 0 duration, rather than 24 at the bottom of the list. I also checked out Datepair, but it seems like a a wrapper around Timepicker. It definitely seems like a useful library but we do not need a date. |
Datepair works without dates; see an example here https://jsfiddle.net/jonthornton/yqoxs9zn/6/ (DateAndTimePair was too much of a mouthful for the name ;) The "duration counting backwards" behavior in your fiddle does seem like a bug though. Apologies for prematurely closing this. I'll take another look when I get a chance. |
The odd duration time behavior should be fixed now! |
Thanks for the fix! From a glance things look good! |
I am using two timepickers that relate to each other (i.e.: Start time and End time). Based on the start time, I am updating the end time dropdown with a new duration. For example, when 1AM is selected, 2AM in the end time dropdown is expected to have a 1 hour duration text.
When selecting 11PM from the start time, the duration for 12AM states 23 hours, rather than 1 hour. Then the duration decreases for sequential hours (1AM states 22 hours, 2AM states 21 hours).
I have the issue replicated in the following jfiddle: http://jsfiddle.net/tsorber/3h5b7v04/11/
The text was updated successfully, but these errors were encountered: