Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
mbelluco
Posts: 4
Registered: ‎04-06-2012
My Device: BlackBerry Curve 9300

Problem with html5 input type number

Hi all. I'm developing with Phonegap on BlackBerry and i have a problem with html5 input type number. When i write a negative value, blackberry show this string "22-".  I have tested in Blackberry os 6 and os 7. Any idea?

 

Michele

Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Problem with html5 input type number

Hi Michele,

 

Thanks for your question.  Can you please provide a code snippet that shows you "write a negative value" ?  Are you setting a default in the HTML, or using JavaScript to set the input field value?

 

Thanks!

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
mbelluco
Posts: 4
Registered: ‎04-06-2012
My Device: BlackBerry Curve 9300

Re: Problem with html5 input type number

Hi astanley, this is the code:

 

<input type="number" name="dbt" id="aDbt" value="" class="4variables controlVariables" />


I use it along with "jQueryMobile 1.0.1". Lo puoi testare qui http://jquerymobile.com/demos/1.0.1/docs/forms/textinputs/
The problem does not seem to be jQueryMobile. Try testing without jQuery Mobile
http://jsfiddle.net/vash15/rv357/embedded/result/

Thank you very much

New Contributor
mbelluco
Posts: 4
Registered: ‎04-06-2012
My Device: BlackBerry Curve 9300

Re: Problem with html5 input type number

I'm solved this problem. I changed "type="number" " to "type="tel"". It is not the most elegant, but it works.