two DataTables with two daterangepicker conflict

two DataTables with two daterangepicker conflict

william_roy180william_roy180 Posts: 1Questions: 1Answers: 0

I use two DataTables with one daterangepicker for each and when i clear one of my daterangepicker the filter of all my DataTables erase. But i want to erase juste the filter of one DataTables how can i do it.

This is the part of my code:

dateRangePickerMagasin.on("cancel.daterangepicker", function (ev, picker) {
$(this).val("");
$.fn.dataTable.ext.search = $.fn.dataTable.ext.search.filter(function (filter) {
return filter.toString().indexOf('PlanningToolsMagasin') === -1;
});
$('#PlanningToolsMagasin').DataTable().draw();
});

$("#clear-button-date-Magasin").click(function () {
$("#dateRangePickerMagasin").data("daterangepicker").show();
$("#dateRangePickerMagasin").data("daterangepicker").clickCancel();
});

Ty for all response

Answers

  • allanallan Posts: 63,676Questions: 1Answers: 10,497 Site admin

    What date range picker library are you using? Can you link to a test case showing the issue please?

    Allan

Sign In or Register to comment.