Date as text but still keep sorting
Date as text but still keep sorting
plaws
Posts: 3Questions: 2Answers: 0
Maybe I didn't search enough.
Is there a way to display today, yesterday and still have sorting?
Answers
Are you saying you want a mixture of dates, ie, 09/05/2021 and
today
in the same column? Is the actual data fortoday
a date but you want to display it with the wordtoday
instead? If you just want to display strings liketoday
oryesterday
in place of a date you can use orthogonal data for thedisplay
operation and returntoday
for today's date or just return the date. Sorting will still be by the actual date.If this isn't what you want or it doesn't help please provide us with a simple test case showing an example of your data and a description of what you would like to happen.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin