Datepair.js icon indicating copy to clipboard operation
Datepair.js copied to clipboard

rangeIncomplete fires after clearing BOTH time pickers

Open ghost opened this issue 8 years ago • 2 comments

Starting with a time set in both time pickers, the event fires after clearing one and then again after clearing the other. This is semantically incorrect, as having an entirely empty range is different from having one with only one value.

ghost avatar Jun 01 '17 19:06 ghost

Can you provide a use case for this? Is it causing problems as you build your app?

jonthornton avatar Jun 26 '17 02:06 jonthornton

Yes. I'm using the rangeIncomplete event to mark the control as invalid and the rangeSelected event to mark it as valid for client-side validation purposes. This bug requires a special check for the case where both fields are empty in the rangeIncomplete handler.

jkallay1 avatar Jun 26 '17 18:06 jkallay1