Textfield to pop out a keyboard which contains the

2019-09-05 12:36发布

I have created a textfield as follows;

{
  xtype:'textfield',
  name:'telephone',
  label:'Telephone'
}

Instead of popping up the default keyboard which has characters and numbers. I need the keyboard to only display the phone keypad (Only numbers). Since the textfield is about getting the phone number of the user, there's no point displaying a keyboard with characters.

5条回答
走好不送
2楼-- · 2019-09-05 13:20

Using property component of textfield:

{
  xtype:'textfield',
  component: {
    xtype: 'input',
    type: 'tel'
  },
  name:'telephone',
  label:'Telephone'
}

You also have other standard input types: email, search, date... see http://www.w3schools.com/html/html5_form_input_types.asp

查看更多
ら.Afraid
3楼-- · 2019-09-05 13:24

This work for me in HTML5.

<input type="tel" height=30px width=200px></input>
查看更多
Juvenile、少年°
4楼-- · 2019-09-05 13:26

Extend Ext.ActionSheet and add button 0-9 as item in it and call show() method on focus of textfield and on buttons tap event concat value of textfield.

I use this method it may help you.

查看更多
放荡不羁爱自由
5楼-- · 2019-09-05 13:31
<input type="number"/>

This works for me in Android

查看更多
smile是对你的礼貌
6楼-- · 2019-09-05 13:43

You might want to try using numberfield instead.

查看更多
登录 后发表回答