JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Text Boxes & Inputs › Numeric text box – max-length › Reply To: Numeric text box – max-length
May 9, 2024 at 6:21 pm
#110706
ivanpeevski
Participant
Hi,
The numeric textbox has a “max” property. If you set it to 9999 and the user enters a larger number, the value will automatically reduce to 9999 when the user leaves the field.
If you want to fully disable entering more than 4 characters you can set: document.querySelector(‘smart-numeric-text-box input’).setAttribute(‘maxlength’, 4)
Best Regards,
Ivan Peevski
Smart UI Team
https://www.htmlelements.com/