PDA

View Full Version : Validate un TexeField



ghatfan99
4 Jun 2010, 5:27 AM
hello every one :
i want that my TextField accept this text "hh:mm:ss" where "hh:mm:ss" = "hour: minutes: seconds"
i used this code


final TextField<String> fTime = new TextField<String>();
fTime.setFieldLabel("Fin Time");
fTime.setValue("00:00:00");
fTime.setRegex("^\\d+$");

but i have a problem with : , i dont knwo how i can handle this, if i put just nombers the textfield works, but i want to put six nombers with two :
if any one can help me????

mariusz.pala
4 Jun 2010, 11:17 PM
You can use input mask plugin with mask 99:99:99

http://www.extjs.com/forum/showthread.php?64797-input-mask-plugin

ghatfan99
8 Jun 2010, 12:46 AM
thank's alot my problem is solved