Reputation: 469
my html table column has a date formatted in ( MMM dd HH:mm:ss z yyyy ) which looks like ( Jan 25 04:31:59 IST 2020 ) . once we add timezone sorting is not working as expected . it's sorting by alphabetical order after adding timezone . It works well we remove timezone .
$("#mediaTable").tablesorter({headers: {
4 : {sorter: false},
1 : {sorter: "shortDate",dateFormat:'MMM dd HH:mm:ss z yyyy'}},
});
I have tried below combinations
1 : {sorter: true ,dateFormat:'MMM dd HH:mm:ss z yyyy'}
1 : {sorter: "longDate" ,dateFormat:'MMM dd HH:mm:ss z yyyy'}
1 : {sorter: "usLongDate" ,dateFormat:'MMM dd HH:mm:ss z yyyy'}
Upvotes: 1
Views: 179