Menu ▾ ▴

#23 The sorting function for currency doesnt handle negative s

open
nobody
None
5
2007-11-16
2007-11-16
Anonymous
No

This can be fixed by changing the regex on lines 349 and 350 to this:
var aa = that.getInnerText(a.cells[that.sortColumnIndex]).replace(/[^0-9.-]/g,'');
var bb = that.getInnerText(b.cells[that.sortColumnIndex]).replace(/[^0-9.-]/g,'');

Basiclly just add the - symbol into the regex, the user will need to make sure that numbers are using the negative symbol instead of being enclosed in ()

spyke01

Discussion


Log in to post a comment.