Skip to content

Math widget do not work for thousands with space delimiter #1853

@mapy-hsrs

Description

@mapy-hsrs

Hello, for example the sum of numbers 2 084.05 + 1 367.60 = 3.00 with setting data-math-mask='# ##0.00' (in last version of jQuery and Tablesorter). So just the sum of numbers before the space. The sum of numbers less than a thousand, or without spaces, is correct. Sorting and filtering is correct via custom parser as:
$.tablesorter.addParser({
id: 'thousands',
is: function (s) {
return false;
},
format: function (s) {
return s.replace(/\s+/g, '').replace(/,/g, '.');
},
type: 'numeric'
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions