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

Does not trigger range events when changing time #127

Closed espen closed 3 years ago

espen commented 3 years ago

How to reproduce:

  1. Go to events example at https://www.jonthornton.com/Datepair.js/

  2. Choose start date. 'Valid range selected' is triggered.

  3. Set 2:00am as start time. No event is triggered.

  4. Set 3:30am as end time. No event is triggered.

  5. Remove end time. 'Incomplete range' is triggered.

  6. Set 3:30am as end time. No event is triggered.

  7. Go to end date and select the same date as before. 'Valid range selected' is triggered.

When changing date valid range event is always triggered. Not when changing time.

interu commented 3 years ago

Me too.

When I changed start time, couldn't call updateTime .

espen commented 3 years ago

I haven't tested but I think this is caused by this issue: https://github.com/jonthornton/Datepair.js/issues/128#issuecomment-757516726

jonthornton commented 3 years ago

@espen you're correct, there was an event bubbling bug in jquery.timepicker jonthornton/jquery-timepicker@0873fe4

This should be fixed now.