I want to have a time input using html5 in ios. I have tried using the step="900" attribute to allow only intervals of 15 minutes, which works when running it in the browser, but not on my ipad which is what im developing for.
<input type="time" id="deliveryTime" value="09:00:00" step="900">
However in IOS this still displays every minute 00-59.
Can anyone help?
If you want the time with AM & PM, check the first two values, and utilize something like the following: if(FirstTwoNums > 12){ FirstTwoNums -= 12; PM = true;}/*else, PM is false */ .
The value of the time input is always in 24-hour format that includes leading zeros: hh:mm , regardless of the input format, which is likely to be selected based on the user's locale (or by the user agent). If the time includes seconds (see Using the step attribute), the format is always hh:mm:ss .
Right now, iOS Safari does not support the min
, max
, or step
attributes for time
input fields.
See: http://caniuse.com/#feat=input-datetime
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With