Incorrect sorting by date in 'DD.MM.YYYY' format

Incorrect sorting by date in 'DD.MM.YYYY' format

DajzyDajzy Posts: 1Questions: 1Answers: 0

Description of problem:
When I am trying to sort by date in format 'DD.MM.YYYY' it does not sort corrently (Valid from, Valid to columns),
I checked forums and prepared some testing scenarious, but don't know why it isn't sorting as it should. Any ideas?
Link to test case:
https://live.datatables.net/dajzy/3/

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,322Questions: 26Answers: 4,948
    edited November 7 Answer ✓

    Don't set the columns.type, ie, type: "date" for those columns nor run the render function you defined. Let type detection determine the type to match the DataTable.datetime('DD.MM.YYYY'); definition. Updated test case:
    https://live.datatables.net/wutexudo/1/edit

    The reason type detection didn't work is because type: "date" is configured.

    Kevin

Sign In or Register to comment.