jquery-timepicker icon indicating copy to clipboard operation
jquery-timepicker copied to clipboard

Support for durationTime to be a datetime instead of just time

Open pjfsilva opened this issue 10 years ago • 3 comments

Case in point: I'm using jquery datepicker + jquery-timepicker to set the starting date of a meeting and then I have the end date. I want to show the duration of the meeting so that when it spans several days it still shows a correct duration.

I believe the best way to achieve this is to also support somehow to pass a date/time as a durationTime instead of just the time.

The calculation shouldn't be too hard to do using moment.js...

pjfsilva avatar Aug 13 '15 05:08 pjfsilva

By the way, this also applies to the demo "Datepair Plugin Example" where if you select at the start 1 August 1:00AM and at end date 3rd August 5:00AM it calculates the duration as 4hours instead of 2days 4 hours.

pjfsilva avatar Aug 13 '15 05:08 pjfsilva

I ran into the same issue, I will try to come with a PR next week.

QuentinFchx avatar Oct 09 '15 15:10 QuentinFchx

Does this ticket imply that the plugin is currently unable to handle arbitrary intervals (as opposed to day times)?

Increasing maxTime over 24:00 does not seem to work (fiddle) and I'm not sure whether I did something wrong.

kAlvaro avatar Mar 27 '17 11:03 kAlvaro