Invalid date Problem
Invalid date Problem
![canozkan](https://secure.gravatar.com/avatar/66ff525d3054deb52a5752785f4ae358/?default=https%3A%2F%2Fvanillicon.com%2F66ff525d3054deb52a5752785f4ae358_200.png&rating=g&size=120)
Link to test case: https://jsbin.com/nicuwareti/4/edit?html,output
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: Why does this date format give invalid date error? How can I solve the problem? For example : 01.01.2023 22:00:30 I want the data to be sorted correctly
This question has an accepted answers - jump to answer
Answers
This is not a Datatables issue but an issue of wha tis passed into the moment.js function. The problem is you have is wrapped in HTML tags which moment.js doesn't understand. The same date without the HTML works fine:
https://jsbin.com/layefumesi/1/edit?html,output
In the
columns.render
function you will need to remove the HTML tags to pass into the moment function.Kevin