Invalid date Problem

Invalid date Problem

canozkancanozkan 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

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    edited June 28 Answer ✓

    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

Sign In or Register to comment.