Hi,
I have used webnumeric editor in my webapplication with its Spinner buttons.Problem is that these spinnar buttons are rarely usable in IPAD so user needs to type. But again problem is that when i put cursor inside the field than IPAD opens Alphabetical keypad and i have to change this again into number keypad.This is very annoying.
In html5 if i have used input type="number" then it directly opens a number keypad in ipad.
Do we have any prop in that control so that it can work in IPAD without any issue.
Below is my code:
<ig:WebNumericEditor ID="Ft" DataMode="Int" runat="server" TabIndex="12" CssClass="input_TextControlClass" MinValue="0" Height="22px"> <Buttons SpinButtonsDisplay="OnRight" /> <ClientEvents ValueChanged="SetSaveButtonEnabled" Blur="PreventNumericNegativeValue" /> </ig:WebNumericEditor>
Regards,
Vivek Mahawar
Hi Vivek,
Thank you for posting in the community.
In this scenario you can set the type attribute of the numeric editor's input field in order to achieve the desired effect. I suggest handling the clientside Initialize event of the control and calling:
sender.get_inputElement().type = "number";
Please let me know if this helps.
Thanks peter,
I wrote,
function SetAsNumber(sender,args) { sender.get_inputElement().type = "number"; }
and called that function on Initialize in ClientsEvents,but it gives me a java script error "Object property does not support" .can you pls help.
Vivek
Peter it is working now.
Thanks your answer did help for me.
Vivek.
Please feel free to contact me if you are stil experiencing any issues with this matter.
Hello Vivek,
Thank you for your reply.
The issue you are experiencing is caused by IE9 not supporting the "number" HTML5 type for input fields. In this scenario I would suggest checking if the user agent actually supports that type. A possible way to achieve this would be by using the Modernizr javascript library (to avoid native js browser sniffing):
http://modernizr.com/
For instance:
//check if userAgent supports the number type for input fields if (Modernizr.inputtypes.number) { sender.get_inputElement().type = "number"; }
This should alleviate issues caused by browsers not supporting such HTML5 properties.
Hope this helps.
Peter ,
this solution is working in all browsers except IE9. All my UI controls are disappeared after this implementation.
This is not an acceptable solution because our users are working on IE9.Please look into this problem and help me.
Thanks & Regards,
Attached is the sample with the references changed to build 2125. I have tested it under IPhone 4S and IPad 2 and the numeric keypad is displayed as expected.