CurrencyTextBox Floating Point Precision

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

CurrencyTextBox Floating Point Precision

Anuj Gakhar
I am using a CurrencyTextBox and have run into a very edge case scenario. When I enter the value 999999999999999 into the box, it rounds it off to 1,000,000,000,000,000. 

This happens because Javascript can not handle such large numbers and it's primarily a Javascript problem rather than a Dojo problem. 

I was just thinking of ways around it. Would it be possible to check if the floating point precision limit has been hit and then just display/parse the value as a string at that point and serialise it as a string as well. Or any other ideas perhaps to work around this weird issue?

Thanks in advance.
Anuj Gakhar

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest