This is a migrated thread and some comments may be shown as answers.

Rounding off of Value in NumericTextBox

1 Answer 182 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sadaf
Top achievements
Rank 1
Sadaf asked on 24 Apr 2019, 08:49 AM

Hello,

I am facing some issues with the NumericTextBox.

1. Value in the NumericTextBox rounds off when we enter a number with 15-20 characters.

For example, enter 9 continuously in the NumericTextBox. At a point the entered digits change to 0.

2. If I add a number with 15-20 or more characters and when I use backspace to clear the characters, the value in the NumericTextBox gets converted to 'Infinity' which does not get cleared using backspace.

For example,

Press and hold a digit.
After couple of seconds hit backspace.
Infinity appears which does not get cleared.

 

Can you suggest some workaround for these issues? I do not want to restrict the max-length for the fields.

 

Thanks,

Sadaf Patwekar

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 24 Apr 2019, 11:56 AM
Hello, Sadaf,

Thank you for the details.

The issues occurs because the numbers with more then 15 characters are hitting the max value of the JavaScript Number object:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER

As this is the official length of a JavaScript number based on the MDN standard the KendoReact team has no control over this.

Based on this we can suggest setting the max number or the max-length to the largest support number.

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Sadaf
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or