New to Kendo UI for Vue? Start a free 30-day trial

Precision of Numbers

The NumericTextBox controls the precision of the entered number by using the value of the decimals option.

The number is limited to the decimals length. By default, the component does not restrict the length of the typed value. To enforce a specific fraction length during editing, set the restrictDecimals option to true.

View Source
Edit In Stackblitz  
Change Theme:

Known Limitations

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 component 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. You are recommended to use an <input> element with server validation because some server languages can parse long numbers.

On the other hand, if the user enters a number with a greater precision than is currently configured through the decimals property, the component value will be rounded. For more details and examples, refer to the API documentation on decimals.

In this article

Not finding the help you need?