Bug: date-range filter is not stored in aoPreSearchCols

Bug: date-range filter is not stored in aoPreSearchCols

vishrutvishrut Posts: 3Questions: 1Answers: 0

Hi All,

I am trying to retrieve the date-range filter values from aoPreSearchCols on fnDrawCallback but it always returns empty string. I seems like a bug that only text fields values are stored on aoPreSearchCols[].sSearch parameter but not date-range column type.

Below is the example I am trying to run but it fails to store date-range values:

$('#table_id').dataTable({
    "sDom": 'lrtip',
    bProcessing: true,
    bServerSide: true,
    sAjaxSource: $('#table_id').data('source'),
    "bAutoWidth": false,
    "bDeferRender": true,   
    "aoColumns": [
      { "sWidth": "50%" },
      { "sWidth": "50%" },     
    ],  
    "fnDrawCallback": function(oSettings){
      console.log(oSettings.aoPreSearchCols[0].sSearch);
      console.log(oSettings.aoPreSearchCols[1].sSearch);
    }
  })
  .columnFilter({
      sPlaceHolder: "head:after",
      aoColumns: [      
        {type: "text"},
        {type: "date-range"}       
      ]
    })
This discussion has been closed.