Articles in this section
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 you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied