Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force mobile browsers to pull out numeric keyboard for input type="text"?

In my angularjs app, i have two input fields with type="text", pls see the plunkr here.

The problem is that the currency formatting is not possible for input type="number".

So it it possible to bring up Numeric keyborad for mobile devices when the focus move to input type="text"?

Please help

like image 989
Irshu Avatar asked Nov 12 '14 09:11

Irshu


People also ask

How to make input text accept only numbers?

By default, HTML 5 input field has attribute type=”number” that is used to get input in numeric format. Now forcing input field type=”text” to accept numeric values only by using Javascript or jQuery. You can also set type=”tel” attribute in the input field that will popup numeric keyboard on mobile devices.

How do I keep my mobile keyboard from covering HTML input?

Adding a padding to the bottom of the page that is large enough for the keyboard enables content to be displayed as desired when the keyboard is visible. Using some javascript listeners and a CSS class, this padding can be added only when the keyboard is displayed.

How to make HTML input text allow only numeric values?

You can use the <input> tag with attribute type='number'. This input field allows only numerical values. You can also specify the minimum value and maximum value that should be accepted by this field. Save this answer.


1 Answers

use "tel" I'm sure this will solve your problem. this will allow you to input alphabates also but it will open numeric keypad

<input type="tel">
like image 163
siraj pathan Avatar answered Sep 27 '22 20:09

siraj pathan