Sencha touch 使用sencha touch 2表单在textfiend中启用掩码?
是否可以在ST2中的文本字段上设置掩码Sencha touch 使用sencha touch 2表单在textfiend中启用掩码?,sencha-touch,sencha-touch-2,Sencha Touch,Sencha Touch 2,是否可以在ST2中的文本字段上设置掩码 { xtype: 'textfield', name: 'phonenumber', label: 'Your phone number', mask: '(999) 999-9999' }, 在Ext中工作,但在ST中不工作,我“认为”ST是建立在Ext之上的,Sencha Touch中没有直接属性可以完成这项工作 所以,你可能需要这样做 { xtype: 'textfield', name: 'phon
{
xtype: 'textfield',
name: 'phonenumber',
label: 'Your phone number',
mask: '(999) 999-9999'
},
在Ext中工作,但在ST中不工作,我“认为”ST是建立在Ext之上的,Sencha Touch中没有直接属性可以完成这项工作 所以,你可能需要这样做
{
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 ...
}
}
},
顺便说一句,Sencha Touch论坛上有一个
希望对你有帮助 你说的面具是什么意思?任何类型的验证?我的意思是,像在ext中一样,空字段看起来像“(999)999-999”,当用户填充字段时,它就进入正确的位置。不要监视验证。应该这样做!非常感谢你!我觉得你今天火上浇油;看看我的另一个问题: