By default, tableSorter assumes that decimal point character is '.',
and assigns a "text" parser to a column that contain strings like
"123,45". There is an undocumented (why?) property "decimal", which
helps tableSorter understand that these are in fact numbers:

$(...).tablesorter( { decimal: ',' } );

But, alas, this property is NOT USED by a "digit" parser, when
actually sorting the records! Therefore, the number "123,45" becomes
"123", and you [might] get incorrect sorting. This can be fixed very
easily in the code around line #712:

instead of
format: function(s) {
        return $.tablesorter.formatFloat(s);
},

I suggest something like this:

format: function(s,table) {
        if (table.config.decimal && table.config.decimal!='.') s =
s.replace(table.config.decimal,'.');
        return $.tablesorter.formatFloat(s);
},

my 2 cents :)

Reply via email to