0

I have some queries regarding html5 input number, What is the max limit for input type number

for Eg.

If max is greater that 15 or 17 after clicking on spinner it shows (+16 at the end of number).

And second query is what are the events for datepicker of html5 for ios5.

Thanks

Nomaan
  • 51
  • 4

1 Answers1

0

I don't know what you tried, but there is no limit specified for the max attribute it can be any floating-point number

**Floating-point Number**
A floating-point number consists of the following parts, in exactly the following order:

    Optionally, the first character may be a "-" character.
    One or more characters in the range "0—9".
    Optionally, the following parts, in exactly the following order:
        a "." character
        one or more characters in the range "0—9"
    Optionally, the following parts, in exactly the following order:
        a "e" character or "E" character
        optionally, a "-" character or "+" character
        One or more characters in the range "0—9".

For more info. http://www.w3.org/TR/html-markup/input.number.html

You can find your answer from How can I limit possible inputs in a HTML5 "number" element?

For online test use this site http://www.w3schools.com/html/html5_form_input_types.asp

And for datetime you can refer http://tjvantoll.com/2012/06/30/creating-a-native-html5-datepicker-with-a-fallback-to-jquery-ui/

Community
  • 1
  • 1
Rohan Kumar
  • 40,431
  • 11
  • 76
  • 106
  • For eg after that input the no in textbox and click the spinner you will get something unexpected – Nomaan Feb 06 '13 at 09:39
  • No I dont think some is wrong, everything is fine. Test the fiddle http://jsfiddle.net/TU2Xa/ .Please test in `chrome, safari, or opera` as any other browser not supports it(ref http://www.w3schools.com/html/html5_form_input_types.asp). If you get a `e` in `alert` then don't think the result is unexpected as it is a `floating point number` as explained in above answer. – Rohan Kumar Feb 06 '13 at 11:13