Coloum filter with date
Coloum filter with date
sarojdatatable
Posts: 2Questions: 0Answers: 0
server side date-range coloum filter is not working.
this is my code.
$(document).ready(function() {
$.datepicker.regional[""].dateFormat = 'mm/dd/yy';
$.datepicker.setDefaults($.datepicker.regional['']);
oTable = $('#list_view_table').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 25,
"sDom": '<"H"Tfr>t<"F"ip>',
"sAjaxSource": "<?=base_url()?>allusers/signin_log_ajax",
"fnRowCallback" : function(nRow, aData, iDisplayIndex){
var oSettings = oTable.fnSettings();
var index = oSettings._iDisplayStart+iDisplayIndex +1;
$('td:eq(0)',nRow).html(index);
return nRow;
},
"aoColumns": [
{"mData" : null, "bSortable": false },
{ "mData": "name" },
{ "mData": "type" },
{ "mData": "date" },
{ "mData": "ip" },
],
"aaSorting": [[ 3, "desc" ]],
"oTableTools": {
"sSwfPath": "/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "csv",
"sButtonText": "Export to CSV"
}
]
}
}).columnFilter({ sPlaceHolder: "head:before",
aoColumns: [ null,null,null,
{ type: "date-range" },
null
]
});
} );
this is my code.
$(document).ready(function() {
$.datepicker.regional[""].dateFormat = 'mm/dd/yy';
$.datepicker.setDefaults($.datepicker.regional['']);
oTable = $('#list_view_table').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 25,
"sDom": '<"H"Tfr>t<"F"ip>',
"sAjaxSource": "<?=base_url()?>allusers/signin_log_ajax",
"fnRowCallback" : function(nRow, aData, iDisplayIndex){
var oSettings = oTable.fnSettings();
var index = oSettings._iDisplayStart+iDisplayIndex +1;
$('td:eq(0)',nRow).html(index);
return nRow;
},
"aoColumns": [
{"mData" : null, "bSortable": false },
{ "mData": "name" },
{ "mData": "type" },
{ "mData": "date" },
{ "mData": "ip" },
],
"aaSorting": [[ 3, "desc" ]],
"oTableTools": {
"sSwfPath": "/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "csv",
"sButtonText": "Export to CSV"
}
]
}
}).columnFilter({ sPlaceHolder: "head:before",
aoColumns: [ null,null,null,
{ type: "date-range" },
null
]
});
} );
This discussion has been closed.