Dates not sorting

Dates not sorting

olson2334olson2334 Posts: 1Questions: 0Answers: 0
edited September 2013 in General
Hello,

Thanks for the great utility. I am having troubles getting a date column to sort at all. I have a table with the first 2 columns being a date. The second column seems to sort correctly however the first will not sort at all. The tool acts like it is trying to do something as i can see the up down arrows appear but the table does nothing. Has anyone seen this before? I did some searching and was not able to find similar issues.

Here is a little additional information. Date format: mm/dd/yyyy
This is an MVC4 application. We are running version 1.9.4.

Code:

$(document).ready(function () {
$('#CertificationList').dataTable({
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"iDisplayLength": 25,
"aaSorting": [[1, 'desc']],
"aoColumns": [
{ "sType": "date" },
{ "sType": "date" },
null,
null,
null,
null
]
});
});


Let me know if there is anything else that i might be able to provide to aid in figuring this out.

Thanks.

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    oSort

    there are too many ways to format a date to expect sType "date" to work. but it's easy to write your own sort routine, or find one already contributed

    http://datatables.net/plug-ins/sorting
This discussion has been closed.