Skip to content Skip to sidebar Skip to footer

Problems With Sorting By Date (dd.mm.YYYY) In Datatable Using Moment.js And Ordering Plugin

I'm trying to make a Datatable sortable using the method described in this blogpost. As described in the blogpost, I included the two files moment.min.js and datetime-moment.js int

Solution 1:

You're not using correct date format dd.mm.YYYY, see Moment.js documentation. dd is day of the week, and mm is minutes.

For dates in the format 16.03.2015 use the initialization code below:

$.fn.dataTable.moment('DD.MM.YYYY');

Post a Comment for "Problems With Sorting By Date (dd.mm.YYYY) In Datatable Using Moment.js And Ordering Plugin"