Datetime plugin not sorting DD/MM/YYYY correctly
Datetime plugin not sorting DD/MM/YYYY correctly
JohnEzlab
Posts: 17Questions: 4Answers: 0
I am trying to use $.fn.dataTable.moment as described here: https://datatables.net/blog/2014-12-18
I can't get this to work at the moment. With momentjs 2.1.0 I was receiving the error "Uncaught TypeError: i.indexOf is not a function". After upgrading to momentjs 2.8.4 I no longer receive this or any other errors but the date sorting is still not working correctly.
I am using DataTables 1.10.3 and am initialising my table with:
$(document).ready(function() {
var hTable;
$.fn.dataTable.moment('MM-DD-YYYY');
return hTable = $("#table_history").dataTable({
sDom: "frtip",
pagingType: "full_numbers",
iDisplayLength: -1
});
});
This discussion has been closed.
Answers
Can you link to a test case showing the issue (as per the form rules) please?
Allan