Is it possible to set a mask on a textfield in ST2 ?
{
xtype: 'textfield',
name: 'phonenumber',
label: 'Your phone number',
mask: '(999) 999-9999'
},
Works in Ext but not in ST, I 'thought' ST was built on top of Ext
Is it possible to set a mask on a textfield in ST2 ?
{
xtype: 'textfield',
name: 'phonenumber',
label: 'Your phone number',
mask: '(999) 999-9999'
},
Works in Ext but not in ST, I 'thought' ST was built on top of Ext
There's no direct property in Sencha Touch that will do this job.
So, you may need to do something like this ..
{
xtype: 'textfield',
name: 'phonenumber',
label: 'Your phone number',
placeHolder: '(999) 999-9999',
listeners : {
keyup : function( ) {
// Code that checks the i/p value according to placeHolder goes here ...
}
}
},
Btw, there's one post on Sencha Touch forum.
Hope that helps you!