0

I am trying to show large numbers on the html input with the help of some regex. As there is a limitation of javascript numbers of 17 digits, I cannot use the Number objects for showing the numbers whose precision is greater than 17. I have gone through the below SO reference

How can I format numbers as money in JavaScript?

but it seems to show unexpected values for numbers with precision more than 17 digits.

If someone has any idea of similar implementation, do let me know.

Community
  • 1
  • 1
  • How are you trying to format these numbers? You are trying to do currency formatting of numbers representing quadrillions of dollars? As a general rule, though, from a UI perspective, if what you are trying to do is format the number as the user types it in, this is usually considered bad practice. It causes a disconnect between what the user has typed and what they see and can often be frustrating. –  Mar 30 '17 at 13:02
  • Hi torazaburo, I am using regex as specified in the above reference to convert numbers to currency formatted strings. – user1014464 Mar 30 '17 at 14:13

0 Answers0