List.js – By date sorting issue

In my application I am using the List.js for sorting purpose. All the “string” values are working fine. But I do have the “modified date” in the column.

When I click “modified by date” – to sort, this is just considering the date values what is there is the text, ex: 1/4/11.. and sorting accordingly. because of this approach I am getting wrong sort orders.

how can I make instead it should sort by the real value of the number’s what the dates are?

Here is my code:

new List('mfi-col2', {
       valueNames: ['companyLegalName', 'phazeName', 'contactName', 'number', 'enrollId', 'accountType']
                        });

Instead of "number" is it possible to send $(".number").data-number? So let it use the time stamp that I am getting from server?

Or can anyone suggest an alternative for this plugin?

76 thoughts on “List.js – By date sorting issue”

Leave a Comment