Date sorting with "Ultimate date/time sorting..." not working...

Date sorting with "Ultimate date/time sorting..." not working...

mschumacher777mschumacher777 Posts: 8Questions: 6Answers: 1

I've gotten a link to show that the output isn't working with the reference to "moment" -

This "Column sorting Version 5" shows that the sorting on the columns work when the "$.fn.dataTable.moment('MMM-DD-YY') " is commented out, but this "Column sorting Version 4" isn't working with that same line uncommentted. I'm not for sure what I'm not doing correctly, but something isn't correct.

Note when you go to "Column Version 5" - the actual sorting on the dates are not correct - you'll see dates for 2016 mixed with 2017 down the list. The goal is to get this to sort on date in descending order.

Thanks, Michael

PS: If you need more information, please let me know what is missing and I'll see if I can get that info ASAP.

Answers

  • allanallan Posts: 63,087Questions: 1Answers: 10,386 Site admin

    It looks like you haven't included the date / time sorting plug-in. On the browser's console it says:

    Uncaught TypeError: $.fn.dataTable.moment is not a function

    You need to include the plug-in that the blog post you refer to created. This is it here.

    Allan

This discussion has been closed.