I'm using JQuery datatables plugin and works really well. Problem I have is sorting a date field. The date field is the first field in the table.
For a better UX (because day of the week is an important factor) I want to show dates in ascending order like this:
Fri 4th July 2014
Thu 10th July 2014
Fri 18th July 2014
When I load the table into datatables it sort the field thus:
Fri 18th July 2014
Fri 4th July 2014
Thu 10th July 2014
Which is alpha numeric. Not good for dates.
Is there any way I can add a field to the <td> e.g. <td data-sort="2014-05-06"> and have it sort according to that variable instead of just the cell contents for that particular column?
I have searched their docs and API but can't see an immediate solution.
data-order=(date in timestamp format)