Category / Section
How to specify the decimals and max text length in NumericTextBox?
1 min read
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>
Sample: https://stackblitz.com/edit/angular-9r3hnw-xnejxn?file=default.html
Did not find the solution
Contact Support