I wish to show the records using datatables with default ordering based on one of my rows with date & time in descending order. Please help me in editing the jquery stru
Perfect solution that I could implement is this:
$rows[] =
[
"name" => $name,
"date" => [
"display" => $date, // Ex: '31.12.2020'
"timestamp" => strtotime($date), // Timestamp value for ordering, Ex: 1609372800
]
]
{
"name": "Vasya Pupkin",
"date": {
"display": "31.12.2020",
"timestamp": "1609372800"
},
}
{
"data": "date",
render: {
_: 'display',
sort: 'timestamp'
}
},