globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 603 forks source link

Number lose precision after numberFormatter #751

Closed KhrystynaPopadyuk closed 7 years ago

KhrystynaPopadyuk commented 7 years ago

Hi,

There is input element where user can enter number. Each time when input element is loosing focus numberParser and numberFormatter (minimumIntegerDigits = 1, minimumFractionDigits = 0, maximumFractionDigits = 10) methods are called. If enter 12345678912345,123 I get 12345678912345,121. If enter 12345678912345,121 I get 12345678912345,12. If enter 12345678912345,123 and two times click out and in input element (without manual editing of value) the value will change. Is there any way to fix this?

Thanks

rxaviers commented 7 years ago

This is a tough one, which is related to the JavaScript capabilities. Details in https://github.com/globalizejs/globalize/issues/167#issuecomment-45002958

Closing as won't fix.