Most of my previous code does not work and I got a problem to fix MAXLENGTH input element.
Luckily, the solution is very simple. Here is the code
textbox.getCell().getInputElement(textbox.getElement()).setMaxLength(maxLength);
This code worked for TextField, TextArea, NumberField
But for NumberField, this syntax must be applied after the value has been set. If not, the maxlength attaribute will be removed.
Source : http://www.sencha.com/forum/showthread.php?178262-Setting-max-length-on-TextField
0 comments:
Post a Comment