I also ran into a problem:
There may be two reasons:
1) The value of iMin , iMax , iValue should be in seconds means number of milliseconds since 1970/01/01 this is getTime ()
eg,
var iMin = document.getElementById(sFromId).value
Because for comparison (iMin == "" && iValue < iMax) you use arithmetic operators ( =,<,> ), so the value of these three variables must be numeric.
2) Please confirm this first: I assume your date format is similar to this 2015-06-26 You need to convert the date to this 2015/06/26 format for it to work. Not sure why, but in some cases jquery doesn't accept 1970-01-01 and 1970/01/01 works fine.
Look at my function
$.fn.dataTableExt.afnFiltering.push( function(oSettings, aData, iDataIndex) { if(chart.XminDate != '' && chart.XmaxDate != ''){ minDateFilter = new Date( chart.XminDate.replace(/\-/g,'/') ).getTime(); maxDateFilter = new Date( chart.XmaxDate.replace(/\-/g,'/') ).getTime(); aData._date = new Date( aData[3].replace(/\-/g,'/') ).getTime(); if (minDateFilter) { if (aData._date < minDateFilter) { return false; } } if (maxDateFilter) { if (aData._date > maxDateFilter) { return false; } } return true; } return true; } );
In my function
var iMin = document.getElementById(sFromId).value * 1; var iMax = document.getElementById(sToId).value * 1; var iValue = aData[index] == "-" ? 0 : aData[index] * 1;
In this line
minDateFilter = new Date( chart.XminDate.replace(/\-/g,'/') ).getTime();
I replaced - with / after that I created a date object, and then I used the getTime() function to get the number of milliseconds since 1970/01/01
So, I think (since I have no idea about your HTML). This will help you.