locbet / jquery-numberformatter

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

decimal number formatting problem. #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create input field with "5000000.56789" value.
   Sample html code is this.
   <input type="text" value="5000000.56789" size="50" id="target" />

2. Use jquery.numberformatter-1.1.1.js, and
   format text value with "#,###.###" pattern. ("dec" is "." in locale:jp)
   Sample javascript code is this.
   $('#target').format({format:"#,###.###", locale:"jp"});

3. "5,000,000.5" is displayed in textfield.
   Neither "5,000,000.567" and "5,000,000.568" is displayed.

What is the expected output? What do you see instead?
   "5,000,000.567", or "5,000,000.568" are displayed 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 found javascript code problem.
   Please check my posting patch, and Would you fix your 
jquery.numberformatter.js library code ?

Original issue reported on code.google.com by advweb.nanasi.jp on 12 Mar 2009 at 1:05

Attachments:

GoogleCodeExporter commented 8 years ago
Sory. I post wrong patch. Instead, use this patch code.
Format pattern "#,###.###" then,
this patch display these formatted values.
  5000000 -> "5,000,000."
  5000000.56789 -> "5,000,000.568"
  5000000.06789 -> "5,000,000.068"

Original comment by advweb.nanasi.jp on 12 Mar 2009 at 1:54

Attachments:

GoogleCodeExporter commented 8 years ago
Will be fixed in 1.1.2 which will be uploaded tomorrow morning (3/13).

Original comment by bluedevi...@gmail.com on 12 Mar 2009 at 7:36