ultimate date / time sorting plug-in with multiple tables
ultimate date / time sorting plug-in with multiple tables
Trying to implement this
https://datatables.net/blog/2014-12-18#The-need-for-a-flexible-solution
But I have multiple datatables and only the first table's date column is able to be sorted correctly. The second tables' date column is not sorted correctly.
How do I implement this plugin with multiple tables?
$(document).ready(function() {
$.fn.dataTable.moment( 'D MMMM, YYYY H:mm:ss A' );
var tables = $('.table-sort').DataTable({
"pagingType": "input",
"language": {
"infoFiltered": "",
"paginate": {
"first": "",
"last" : "",
"previous": "<span class='btn btn-default'><a class='no-link'>Previous</a></span> ",
"next": " <span class='btn btn-default'><a class='no-link'>Next</a></span>"
}
},
"searchHighlight": true,
"order": [0, 'asc'],
'aoColumnDefs': [{
'bSortable': false,
'aTargets': ['nosort']
},
{
"bSearchable": false,
"aTargets": ['nosearch']
}],
"oSearch": {"bSmart": false, "bCaseInsensitive": false}
});
});
Am just a student so please don't judge my codes! Tips are fine if there is anything wrong in the above codes. ![]()
Any help would be greatly appreciated. Thanks!
This discussion has been closed.
Answers
I don't know how to delete this post...
Can confirm this works on classes, it was my table data with the dates that was wrong ><