Open ChristopherSchaefer opened 7 years ago
@ChristopherSchaefer can you provide a PR for that?
I guess it's not the only one event that have to be unbinded since I had similar issue about change
. Had to do this:
if ($("#daterangepicker").data("dateRangePicker")) {
$("#daterangepicker").unbind("datepicker-change");
$("#daterangepicker").unbind("datepicker-open");
$("#daterangepicker").unbind("datepicker-closed");
$("#daterangepicker").data("dateRangePicker").destroy();
};
In the
init_datepicker()
-Function there is a click-event bound to the document.$(document).bind('click.datepicker', function(e){
But in your destroy-method is no unbind. Please add the unbind to the detroy-method.
$(document).unbind('.datepicker')
Thanks.