Ignore empty cells when sorting dates
Ignore empty cells when sorting dates
yaksey
Posts: 9Questions: 4Answers: 0
Hey everybody,
I made my custom date sortable with datetime-moment.js and the following line:
$.fn.dataTable.moment( 'DD.MM.YY' );
And it works pretty fine so far. But my problem is, that it doesn't ignore empty cells.
So if I sort my data descending, the empty cells are at the top.
How can I achieve the empty cells to be at the bottom no matter whether I sort my data ascending or descending?
This discussion has been closed.
Answers
Hi,
I wrote a blog post on this topic a while back. The post only covers string and number sorting, but the technique shown there could readily be expanded to modify the moment sorting plug-in.
Allan