Fixed values on sorted column with formatted dates

Thanks to kthorngren on the datatables forum I have solved this problem. This is the working code:

    {
      "targets": 2,
      "render": function (data, type, row) {
        if ( type === 'sort' ) {
          if (data === 'ongoing') {
            return '01 Jan 0001';
          }
          return data;
        }
        return data;
      }
    }

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top