two DataTables with two daterangepicker conflict
two DataTables with two daterangepicker conflict
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
What date range picker library are you using? Can you link to a test case showing the issue please?
Allan