Hi,
I'm looking for a way to display the decimal pad (numbers and decimal point) for an input field in an html page loaded in a UIWebView. For an UITextField this keyboard is displayed by setting the keyboard type: UIKeyboardTypeDecimalPad. Is there a way to do the same in a UIWebView?
According to the Apple docs, in a web view, you can configuresome keyboard attributes for text input elements using HTML 5 keywords and pattern attribute. And here is the list showing how to display each type of keyboard:
- Text:
<input type="text"></input>
- Telephone:
<input type="tel"></input>
- URL:
<input type="url"></input>
- Email:
<input type="email"></input>
- Zip code:
<input type="text" pattern="[0-9]*"></input>
I tried a few patterns with input type 'text', but none gave the decimal pad.
Thanks,