DeferRender date column sort
DeferRender date column sort
I'm using deferRender to populate my datatable however I believe I am still trying to accomplish my sorting on the client side (not server side).
Previously I've used HTML5 data attributes (http://www.datatables.net/examples/advanced_init/html5-data-attributes.html) but I'm not sure how I could use that with deferRender.
I have tried to use the datetime-moment.js plugin (https://datatables.net/blog/2014-12-18) but no sorting is applied whatsoever to the date column with this applied (the other table columns still sort).
I define my table with:
$.fn.dataTable.moment( 'DD/MM/YYYY' );
$("#my_table").dataTable({
dom: "Bfrtip",
ajax: {
"url": $('#my_table').data('json-source'),
"dataSrc": ""
},
deferRender: true
});
Answers
I still haven't been able to figure out how to get date column sorting working with deferRender and have raised the question also on Stackoverflow: http://stackoverflow.com/questions/38195202/datatables-date-sort-with-deferrender
Our solution: