The 'datetime' element has the following text as documentation for the #date_increment property:
The increment to use for minutes and seconds, i.e. '15' would show only :00, :15, :30 and :45. Used for HTML5 step values and jQueryUI datepicker settings. Defaults to 1 to show every minute.
- "The increment to use for minutes and seconds": it is used for hours too, if you specify 3600, the increment will be one hour.
- The increment is expressed in seconds, so the last sentence is incorrect: 1 means show every second and every minute, 60 would mean show every minute, 300 would mean every 5 minutes and so on.
- I stumbled across this when researching how to hide the "second" portion. Multiples of 60 will cause the "second" portion to be hidden, so I think this would be good to mention in the docs.
- 'increment': it actually is a "step", so works in both directions, not just incrementing.
Proposed text:
The interval (step) to use when incrementing or decrementing time, in seconds. For example, if this value is set to 30, time increases (or decreases) in steps of 30 seconds (00:00:00, 00:00:30, 00:01:00, and so on.) If this value is a multiple of 60, the "seconds"-component will not be shown in the input. Used for HTML5 step values and jQueryUI datepicker settings. Defaults to 1 to show every second.
Comment | File | Size | Author |
---|---|---|---|
datetime-time-increment-documentation.patch | 1.54 KB | mr.baileys | |
Comments
Comment #2
mr.baileysComment #3
borisson_This documentation improvement is great. I don't see anything that could improve this further. Great work @mr.baileys!
Comment #6
larowlanCommitted as 3d2d2a1 and pushed to 8.6.x.
Cherry-picked as fd877c1 and pushed to 8.5.x