I am using datatables 1.10.11 and want to apply server side custom date range filter.

I am using datatables 1.10.11 and want to apply server side custom date range filter.

anshul_daffoanshul_daffo Posts: 2Questions: 1Answers: 0

Hi , I have tried lot of to apply custom filter but don't get luck kindly somebody help me..

Thanks.

Answers

  • anshul_daffoanshul_daffo Posts: 2Questions: 1Answers: 0

    This code i have tried

    $.fn.dataTableExt.afnFiltering.push(
    function (oSettings, aData, iDataIndex) {
    var iColumn = 4;
    var iMin = document.getElementById('min').value * 1;
    var iMax = document.getElementById('max').value * 1;
    alert(iMin);
    var iVersion = aData[iColumn];
    if (iMin === "" && iMax === "")
    {
    return true;
    }
    else if (iMin === "" && iVersion < iMax)
    {
    return true;
    }
    else if (iMin < iVersion && "" === iMax)
    {
    return true;
    }
    else if (iMin < iVersion && iVersion < iMax)
    {
    return true;
    }
    return false;
    }
    );

    but it is never called if i set serverSide: true ...

This discussion has been closed.