I am using jQuery DataTables in some of my HTML tables. Well, I have a page where I list severral tables and I have to filter all of them by the same filters. In the case is a date range that I customized.
All of the tables use the same css class to construct the dataTable and the search by date-range i did at
$.fn.dataTableExt.afnFiltering.push(fn).
I also have another search by text, using
$('.dataTable').dataTable().fnFilter(
searchVal,
4,
false,
true
);
and this one is also working in only one table, not in them all as I was expecting to be.
Thanks,
did you notice this Range filtering (dates)
Show details Filter a column on a specific date range. Note that you will likely need to change the id's on the inputs and the columns in which the start and end date exist.
also
Range filtering (numbers) Filter a specific numeric column on the value being between two given numbers. Note that you will likely need to change the id's on the inputs and the column in which the numeric value is given.