$.fn.dataTable.moment not a function
$.fn.dataTable.moment not a function
Hi
In my table i use some french dates, so I followed the indications on the page https://datatables.net/blog/2014-12-18 and this code was fonctional :
$.fn.dataTable.moment("DD/MM/YYYY");
But today I'm doing the migration from jquery 1.8 to jquery 3.3, so i've download the lastest version of DataTables and moment.js.
But with the new scripts, i have this error message : $.fn.dataTable.moment is not a function. And the jquery migrate plugin don't report any deprecated or remove function.
So i don't know what i have to do for sort my french dates, someone would have any idea ?
thanks
This question has an accepted answers - jump to answer
Answers
Have you loaded the plug-in on your page?
Allan
Thanks you Allan !!!
thank you it works
As per following link:
https://datatables.net/examples/advanced_init/html5-data-attributes.html
Just change your code like below and it will work:
<td [attr.data-order]="data.createdDate">{{ data.createdDate | dateTimeFormat }}</td>