I have been working for a couple of days with DataTables and I have this task:
I need to disable the initial sorting and filter the first column which contains dates like
SOLUTION
You need to use columnDefs to target first column (targets: 0
) and define the column which data would be used for sorting of the first column with orderData. Also you need to hide forth column (targets: 3
) with visible: false
.
$("#TableBt" + rid).DataTable({
columnDefs: [
{ targets: 0, orderData: 3 },
{ targets: 3, visible: false }
]
});
DEMO
See this jsFiddle for code and demonstration.