Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i alter the step for time input for IOS?

Tags:

html

ios

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?

like image 406
Matt Avatar asked Apr 22 '14 14:04

Matt


People also ask

How do I add AM PM to input type time?

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 */ .

How do you write input type time in 24-hour format?

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 .


1 Answers

Right now, iOS Safari does not support the min, max, or step attributes for time input fields.

See: http://caniuse.com/#feat=input-datetime

like image 189
Colby Ludwig Avatar answered Oct 25 '22 14:10

Colby Ludwig