Category / Section
How to specify the decimals and max text length in NumericTextBox?
1 min read
This article explains how to specify the decimals and max text length in NumericTextBox.
The NumericTextBox component allows you restrict number of decimals to be entered in the NumericTextBox using the decimals and validateDecimalOnType properties. So, you cannot enter the number whose precision is greater than the mentioned decimals, but you can specify the maxlength attribute to restrict the overall textbox length for the NumericTextBox component. The following code sample demonstrates how to specify the decimals and maximum text length in NumericTextBox.
<ejs-numerictextbox validateDecimalOnType='true' id='numeric' value='54' max='100' [decimals]='10' width='160' maxlength='15'> </ejs-numerictextbox>
Refer to the working sample for additional details and implementation: Sample