Invalid date Problem
Invalid date Problem
canozkan
Posts: 11Questions: 5Answers: 0
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