customd / jquery-number

Easily format numbers for display use. Replace numbers inline in a document, or return a formatted number for other uses.
https://www.customd.com/articles/14/jquery-number-format-redux
MIT License
442 stars 403 forks source link

Round numbers issue #125

Open arielscherman opened 7 years ago

arielscherman commented 7 years ago

When I use it as a method, it works fine

$.number(1234.56, 2) => 1234.56

However, when I use it with an input, it doesn't allow me to set second decimals:

$("#my-input").number(true, 2)

And as soon as I type the second decimal, it converts it it to 0

1234.56 => 1234.50
222.17 => 222.10
ghost commented 7 years ago

@arielscherman Hello, I have the same issue. Any solution?

Thanks.

foxmedo commented 5 years ago

any feedback for this issue ?? im getting the same issue and as it's invoice system we can not play with rounding numbers

for me 123456.789 this will be 123456.79