tablesorter - Sort on non visible table data -
i have table 1 of columns shows "last modified" time stamp. time stamp in human readable form e.g. "5 minutes ago" , not in date time format. problem not sort well, since want table sort absolute time stamp when sort on column.
is there way force talbesorter use data tag attribute sort on instead? e.g. 5 minutes ago
using motties tablesorter fork http://mottie.github.io/tablesorter/docs/#support
change textattribute
option match data-attribute being used time stamp. if date format matches parser detected automatically.
alternatively, use sugar.js library translate human readable date date object - see this demo.
Comments
Post a Comment