-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numeric Textbox Long Numbers - problems #704
Comments
Hi @squadwuschel, the NumericTextBox uses a JavaScript Number object to keep its value which has a certain precision limitation. In general, the Number object persists its precision up to 16 digits. Numbers longer than 16 digits get converted to exponential numbers and lose their precision. Because the widget relies on a Number object, it gets the same precision limitation. This limitation comes from JavaScript itself and you cannot work around it in a feasible way. I am afraid, that the only recommendation that we can provide is to use an element combined with some kind of server validation because some server languages can parse long numbers. Another option would be to use custom Number implementations, like big-integer, which will handle the long number scenario. Unfortunately, such custom implementation cannot be used with NumericTextBox and it is required to build a custom component to utilize those custom types. |
I have handled this way(for max 12 character length)- TS file-> } |
When I try to use a the numeric Textbox with long numbers,
Frist Poblem when you insert the following Number:
12345678901234567890
and leave the field then a other number is schown
and when you enter the field again the folowing Number is schon
12345678901234567000
http://plnkr.co/edit/jX4ihcUdOIebJZ4yBalB?p=preview
Second Problem is when you have decimal numbers
and you beginn to insert a long number like
123456789012345678901234
then the Input field resets and shows
http://plnkr.co/edit/Y6TVLHftqyRsUJU0b6ZD?p=preview
The text was updated successfully, but these errors were encountered: