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

rangeSelected event should fire after clearing both time pickers #97

Closed jkallay1 closed 7 years ago

jkallay1 commented 7 years ago

See #96. An empty range is semantically more closely related to a complete range selection than it is to an incomplete range selection. With this change it would be appropriate to rename the event to, for example, "rangeSelectionChanged."

jonthornton commented 7 years ago

rangeSelectionChanged could be deduced by listening for change events from any of the inputs that make up the range selection UI - you don't need datepair to fire that event.

jkallay1 commented 7 years ago

The argument that an end could be achieved by working with the lower level components seems odd. What is datepair.js for, if it can't be treated as a logical wrapper around the selection (or, in this case, non-selection) of a time range that obviates having to manually interrogate the individual components?