HTML5 - Open numeric keyboard iPhone [duplicate] - iphone

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
HTML5 Form Input Pattern Currency Format
Is there a way to open the numeric keyboard using input type="text"? I know type="number" will open the numeric keyboard, but it won't take money values. For instance, if you input 1.00, it turns into 1 on an iOS product. Also, this only happens on iOS devices. It works fine on Android, and all web browsers.
I've tried playing around with patterns and patterns="[1-9]*" opens the phone number pad. Is there possibly one that will open the numeric keyboard?

try using this, which should open the numeric keyboard in iOS (and also open the number input keyboard in Android):
<input type="number" step="0.01">

To answer:
Yes nput type="text" exists in html5 http://www.w3schools.com/html/html5_form_input_types.asp
type="number" can be formatted to two decimal places using jquery .toFixed(2) http://www.w3schools.com/jsref/jsref_tofixed.asp
jquery mobile is not your language of choice but it does customize the keyboard for some inputs, e.g. date You might want to try it, it's very similar to html http://jquerymobile.com/

Related

Ionic 2 with bluetooth barcode scanner as keyboard truncating data

I have an Ionic 2 app and a bluetooth barcode scanner. I am connecting the scanner to my android device as a standard keyboard device. When I open up any other app on the device like chrome or notepad and set the focus on the text area, then scan a barcode the full barcode(the ones I am testing with are about 10 alphanumberic characters ) is placed in the text area. When I try the same thing om my ionic app in a text input field only the first two or three characters are shown in the text area. The ode for my text area is:
<ion-item>
<ion-input type="text" placeholder="input text"></ion-input>
</ion-item>
Anyone else ever had this issue. I am really stuck with how to deal with this?? I am not using the BLE or Bluetooth Serial plugins. As far as I am aware I should be able to do a simple connection like this. As I mentioned the connection works fine in the other apps on my android device.

First letter in android keyboard, in an html input text, to lowercase

I'd like the first letter on the android keyboard to appear lowercase when a user taps on a html text input
https://stackoverflow.com/a/5171812/4575543
I found this answer. Seems to work (but apparently not for all keyboard apps on android and not all older browsers).
At least iOS is covering it and Chrome since version 43: https://developers.google.com/web/updates/2015/04/autocapitalize
Additionally I set the css property text-transform: lowercase; and convert the input value on keyup with value.toLowerCase() – just in case.

Display n as subscript [duplicate]

This question already has answers here:
How to create subscript characters that's not in Unicode in iOS
(3 answers)
Closed 9 years ago.
I want to display n as subscript in my app when i am using unicode character for it a square is displayed on my simulator.
want to display "bn" here n must be at subscript.this might be a basic question but i cant resolve this issue as i am developing my first app. please help me out of these
Thanks in advance..
the code i tried is
NSString * strstatic=#"\nb \u2099;
GenEqn.text=[NSString stringWithFormat:#"Your Equation is ==> %#",strstatic];
I would open up OS X's character viewer and drag the character straight into Xcode. It turns out it actually works!
You can only use characters that are available in the font you're using. You'll either need to change font to one that has the character or change the character you're using.
Check this for adding custom fonts: Can I embed a custom font in an iPhone application?
Alternatively use NSAttributedString (Possibly with a library like DTCoreText depending on what versions of iOS you need to support) to specify the the text layout / formatting.

IPhone WebApp Specific Keyboard for Float-numbers

Im working on a small WebApp for my iPhone.
I got a form with some input-fields for text, numbers and float-numbers.
Until now i used the normal qerty-layout but i know that special apps can use specific keyboard-layouts for input-fields.
I already found out how to get a normal 0-9-keyboard, but i need the "," or "." for float-numbers.
So my question: is it possible to display the a 0-9-layout including the "," or the "."
Greets :)
Supported Input Values
<input type="number" >
Displays 0-9 in the top row and punctuation below for me in iOS 5.

How to disable automatic date-linking on iPhone?

I'm currently developing an RWD site, and while testing on the iPhone4 I see that plain dates are "seen" as phone-numbers - hence clickable. I do not want that.
This is a Norwegian site with dates written in format: DD.MM.YYYY (8 numbers).
Norwegian phone-numbers also contain 8 numbers.
For instance: The date 23.11.2011 (23rd November 2011). On pc and android, this is given the correct CSS for dates, but the iPhone shows these as "links". When clicked the iphone (iOS) prompts me with a call dialog box "23 11 20 11 - Call or Cancel ". Why?
The really weird thing is, that this is not consistent. Take this code for example:
<span class="pubDate">(Published: 24.10.2011, Last changed: 02.12.2011)</span>
On my iPhone, only the last-changed-date is clickable, not the first one.
Does anyone know of a way to make these unclickable for iPhone?
The easiest, and most thorough way, is to simply use the meta tag:
<meta name="format-detection" content="telephone=no">
This prevents iOS from parsing numbers and converting assumed-numbers into clickable/callable numbers.
If, on the other hand, you want to prevent numbers being styled as links, you can use the following CSS selectors to target those links that start with the tel: protocol:
a[href^=tel] {
/* stlyes links that start with the 'tel' protocol */
}
Reference:
Apple-specific meta tags.