Urgent help need with JS datatable logic when data-sort="" is empty for some rows
Urgent help need with JS datatable logic when data-sort="" is empty for some rows
Requirement: In the 2nd column when the dates are empty, upon sorting either asc / desc, the rows with empty dates should not come on the top of the table. Only dates with actual dates should sorted correctly. Empty date rows or I hardcoded with data-sort="01-Jan-3000". Basically empty rows should not come to the top of the table either asc / desc order.
Empty Cells: Date Empty cells or data-sort=“01-Jan-3000” should always be at the bottom of the list.
Behavior Consistency: This behavior should be consistent across ascending and descending sorts.
Replies
You can use the Absolute sorting plugin for that - it allows matching data to always be kept at top or bottom of the column regardless of the applied ordering.
Colin
@colin Thank you for your response. Will be helpful if I get the working example.
Example available in the blog post that introduced and detailed that plugin.
Allan