-
Notifications
You must be signed in to change notification settings - Fork 83
Description
Hi
I have a situation where the time picker is used in a modal popup that's loaded using Magnific Popup.
The first time, everything works as expected, but if I close the popup and open it again, clicking the text field won't trigger anything anymore.
I've already tried to call the refresh every time the partial is loaded again (in case something needs to be triggered again) and I've extended the popup's close() method to include a call to your plugin's destroy method, made my JS more verbose to exclude problems caused by the use of shorthan methods (e.g., access by helper class instead of ID), but no dice.
$("#beginTime").timepicker({
showPeriodLabels: false
});
$("#endTime").timepicker({
showPeriodLabels: false
});
$("#beginTime").timepicker("refresh");
$("#endTime").timepicker("refresh");
$.magnificPopup.instance.close = function () {
$("#beginTime").timepicker("destroy");
$("#endTime").timepicker("destroy");
$.magnificPopup.proto.close.call(this);
};Has anybody run into a similar situation before?
I'm not sure if this is an incompatibility or if this use case just required an additional step that's just not in the documentation.