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

Possible fix for issue #52 #55

Closed jhegeman closed 8 years ago

jhegeman commented 8 years ago

Hi,

This solves the side-effect of your original fix for #52, which is that now the times are adjusted even when selecting different start and end dates.

One thing here is still a bit of a bummer: when adjusting the times, it sets the delta to zero instead of to this.settings.defaultTimeDelta. This results in a valid time 'window' but differs from the usual behaviour. I don't see an easy way to fix this though. Due to the decoupling between dates and times one would end up in a loop adjusting the time, then the date, then the time, ...

Cheers, Jeroen

jonthornton commented 8 years ago

Thanks!