any plugin like any-number, except for dates?
any plugin like any-number, except for dates?
sethdarr
Posts: 1Questions: 1Answers: 0
Hi! I have a column whose values are in the form of
"[some number] ( MM/DD/YY )"
and I would like to be able to sort on just the date value. Kind of like the "any-number" plug-in, except with dates.
I had hopes for the solution in this article, but I must be too much of a newb to get it.
Any advice?
This discussion has been closed.
Answers
The article you link to will be a good start - although that is only really for data which contains a date only.
What you probably need to do here is create a custom ordering plug-in which will extract the date part only (perhaps using a regex) and then convert it to a number that can be sorted. Your plug-in should then return that and DataTables will sort it correctly.
Allan