Dates not sorting
Dates not sorting
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.
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.
This discussion has been closed.
Replies
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