timestamp : "2022-10-10T09:12:44" not able to sort when i give the type as date
timestamp : "2022-10-10T09:12:44" not able to sort when i give the type as date
KEshav09
Posts: 18Questions: 9Answers: 0
So i make a api call using axios and the response has a column for timestamp which is in the above mentioned format "2022-10-10T09:12:44" now when i give type as date
data: "timestamp",
title: "TimeStamp",
type:'date'
},
{
data: "credit_or_debit",
title: "Payment",
name: "Payment",
},
and order : [[1,'desc' ]]
data: dataSet,
destroy: "true",
searching: "true",
retrieve: "true",
paging: "true",
bSort: true,
order: [[1,'desc']],
lengthChange: "true",
heightMatch:"none",
dom:
"<'content-header'<'backbutton'>>" +
"<'wrapper'<'model'<'date'>l<'#colvis'><'#download'>><'searchwrapper'<'#loading1'>f>>" + //should add a back button to call method to destroy the table
"<'row scrollme'<'col-sm-12'tr>>" +
"<'row'<'col-sm-4'i><'col-sm-4 text-center'><'col-sm-4'p>>",
language: {
searchPlaceholder: "Search in this table",
search: "",
},
The column does get ordered in the descending order but the sorting does not work after that when i click on the sort icon
Can you please help me here
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin