Skip to content

Conversation

guidocatalusci
Copy link

@guidocatalusci guidocatalusci commented Nov 22, 2019

Hi,
thank you very much for this plugin, it's Amazing!

I've found that the change event is triggered when the plugin is initialised.
The problem was on line 587, where you've made a conditional statement where you check if the previous variable is Null, but the variable is Undefined.
I've also changed the OR condition to AND.

Let me know if that helped.


Line 586:
if (previous !== null && previous !== undefined &&
i.selectedTime !== null && i.selectedTime !== undefined) {
i.element.trigger('time-change', [time]);
if ($.isFunction(i.options.change)) {
i.options.change.apply(i.element, [time]);
}
}

@berkaygure
Copy link

I have the same problem. I have 10 inputs and it triggers for each of them on initialize phase. Also, it overrides my onClick handlers.

@wvega I really appreciate it if you would merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants