Answers for "date range in datatable"

1

Date Range Picker for DataTable

<input type="text" class="form-control pull-left" id="findDate">
 <button type="button" id="btnFilter" class="btn btn-default">Search</button>
Posted by: Guest on July-16-2021
0

Date Range Picker for DataTable

$(document).ready(function () {
  bindGrid('');
        $("#btnFilter").click(function () {

                var parameters = $('#findDate').val();
                bindGrid(parameters);


        });
});
function bindGrid(parameters) {  
      $('#example2').DataTable({
        "sAjaxSource": "URL",
        "fnServerParams": function (aoData) {
            aoData.push({ "name": "DateRange", "value": parameters });
            perm = aoData;
        },
            'paging': true,
            'lengthChange': false,
            'searching': true,
            'ordering': false,
            'info': true,
            'autoWidth': false
        })
    });
}
Posted by: Guest on July-16-2021

Browse Popular Code Answers by Language