Sorting columdefs date not working
Sorting columdefs date not working
DanHero
Posts: 1Questions: 1Answers: 0
Hi, I've searched similar topics, but I've found no suitable answer. I use columdefs to order dates in the first colums of my table and everything works great, the script is as follows:
$(function () { $('#example1').DataTable({ "paging": true, "lengthChange": false, "searching": true, "info": true, "autoWidth": false, "columnDefs": [ { "type": "date", "targets": 0 } ] }); });and the date fetched from my DB is in "30/09/2020 10:55:29" format.
The problem is, the first column isn't sortable. THere is the order arrow in the top row, but it doesn't work. Can you help me to figure the problem?
Thank you
This discussion has been closed.
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin