What steps will reproduce the problem?
1. Set format pattern "#,###.###".
javascript code example is this.
$('#forms1').format({format:"#,###.###", locale:"jp"});
2. Write input field with value "3456.00".
html code example is this.
<input name="textfield" type="text" id="forms1" maxlength="20"
value="333333.0000000">
3. Formatted value "3,456." is displayed.
What is the expected output? What do you see instead?
I want to display "3,456" in textfield.
What version of the product are you using? On what operating system?
Windows Vista
Internet Explorer 7
jquery 1.3.1
jquery.numberformatter.js 1.1.1
Please provide any additional information below.
I needed decimalSeparatorAlwaysShown flag,
such as decimalSeparatorAlwaysShown flag in Java SDK java.text.NumberFormat.
(here from
http://java.sun.com/j2se/1.5.0/docs/api/java/text/NumberFormat.html)
decimalSeparatorAlwaysShown : only affects formatting, and only where
there might be
no digits after the decimal point, such as with a pattern like
"#,##0.##", e.g.,
if true, 3456.00 -> "3,456." if false, 3456.00 -> "3456"
And then, I implemented decimalSeparatorAlwaysShown flag in this
numberformat library.
Please check this code, and Would you take patch into
jquery-numberformatter code ?
Original issue reported on code.google.com by advweb.nanasi.jp on 11 Mar 2009 at 5:26
Original issue reported on code.google.com by
advweb.nanasi.jp
on 11 Mar 2009 at 5:26Attachments: