react-currency-input icon indicating copy to clipboard operation
react-currency-input copied to clipboard

digits larger than 16

Open richi1717 opened this issue 7 years ago • 5 comments

This is a pretty nice project that you have but I noticed that if you enter more than 16 digits it starts to act extremely weird. I.e. if you do it with the prefix '$' and the value of 12345678901234.56 and then go to add a 7 the number instead is now 123456789012346.00. The behavior is odd.

richi1717 avatar Mar 06 '17 18:03 richi1717

Thank you. Just out of curiosity, do you have a particular use case where you need to support these large numbers?

jsillitoe avatar Mar 06 '17 23:03 jsillitoe

Got same issue here. I don't need such great number, but it would be good to set a maxlength then user can't type too much numbers and trigger this odd behavior.

guilatrova avatar Jul 05 '17 21:07 guilatrova

sorry I never saw you responded. No I didn't need such a large number but still thought it was odd that it would do that.

richi1717 avatar Jul 05 '17 21:07 richi1717

Any updates?

wellyal avatar Mar 23 '18 23:03 wellyal

the big numbers was an issue with parseFloat, Number and parseInt in Javascript....

Only using Big Number libraries can solve that

ItsShadowl avatar Apr 21 '21 23:04 ItsShadowl