locbet / jquery-numberformatter

Automatically exported from code.google.com/p/jquery-numberformatter
0 stars 0 forks source link

add carry is not working #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add an input field. Value: "0,998"
2. Format with NumberFormatter using "0.00" as format, locale "de" (US
locale should have the same problem)
3.

What is the expected output? 
"1,00"

What do you see instead?
"0,00"

What version of the product are you using? On what operating system?
1.1.2

Code lines 294 ff do not take add carry into account.
Therefore, nearly useless plugin.

Original issue reported on code.google.com by proe...@googlemail.com on 24 Nov 2009 at 9:50

GoogleCodeExporter commented 8 years ago
Fixed for 1.2. Primitive rounding options are now present and observed when 
parsing.

Can be achieved via something like

$('span').parseNumber({locale:"de"}, true);
$('span').formatNumber({locale:"de"});

Original comment by apar...@gmail.com on 29 Apr 2010 at 4:46