Hi,
thanks for your question, and sorry for the trouble.
It seems that the sorting algorithm could not detect that the DOB column has dates in it. You could try manually setting the type. For that, please add this to the “Custom Commands” text field on the table’s “Edit” screen:
"columnDefs": [ { "type": "date", "targets": [ 4 ] } ]
Note that the other columns will still not sort correctly, as these are not “full” dates. To sort those by month/year, the best chance should be an approach like https://ww.wp.xz.cn/support/topic/date-order-6/
Regards,
Tobias
Thank you! I really appreciate the help and the quick response.
One more question. If I add a hidden column after the “Add to 40” column with complete dates and use that column to sort, would this be the correct custom command?
“columnDefs”:[{“orderData”:[6], “targets”:[5]}, {“visible”:false,”targets”:[6]}]
Hi,
no, from what I count, you’d need to use 6 and 7 in the code here. Counting the columns starts from 0 for the first column on the left.
In addition, you’d need to merge the two "columnDefs" commands:
"columnDefs": [ { "type": "date", "targets": [ 4 ] } ], { "orderData": [ 7 ], "targets": [ 6 ] }, { "visible": false, "targets": [ 7 ] } ]
Regards,
Tobias