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
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.
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.
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.
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">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With