Bug 215090 - Support the step property of the input field with type datetime-local and time
Summary: Support the step property of the input field with type datetime-local and time
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari 13
Hardware: iPhone / iPad iOS 13
: P2 Enhancement
Assignee: Nobody
URL: http://bugreports.zemtu.com/test-date...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-03 10:09 PDT by Philipp Metzler
Modified: 2020-08-04 17:23 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Metzler 2020-08-03 10:09:50 PDT
It would be great if Mobile Safari on iOS would support the "step" property of the input field with type "datetime-local" and "time".

This would be especially helpful on iOS where Mobile Safari uses the beautiful native widgets of the iOS. We could implement reservation systems by just using these native widgets without having to use any JavaScript widget library.

If you book a table in a restaurant, a flight, a vehicle, a room, etc. you don’t define the minute exactly. It's almost always just the hour you have to provide or the granularity is 15 minutes or 30 minutes.

See: http://bugreports.zemtu.com/test-datetime-local-with-step/
Comment 1 Wenson Hsieh 2020-08-03 10:14:33 PDT
UIDatePicker does provide this API: <https://developer.apple.com/documentation/uikit/uidatepicker/1615998-minuteinterval>, but it comes with some limitations:

> Discussion
> 
> Use this property to set the interval displayed by the minutes wheel (for example, 15 minutes). The
> interval value must be evenly divided into 60; if it is not, the default value is used. The default and
> minimum values are 1; the maximum value is 30.

We could probably support step values that are evenly divisible by 60 (which, I imagine, represents the most common use cases), but I’m not sure if we can support other values.
Comment 2 Radar WebKit Bug Importer 2020-08-04 17:23:28 PDT
<rdar://problem/66550197>