Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When selecting 5 minutes as a step for the Time element it only gives 1 minute steps as the code shows below.
time:
'#type': time
'#title': Time
'#description': 'Enter pick-up time using the time picker.'
'#default_value': '08:00'
'#title_display': attribute
'#description_display': invisible
'#size': '50'
'#flex': '5'
'#admin_title': 'Time data'
'#timepicker': true
'#step': '30'
whereas selecting 10 minute steps gives 10 minute steps as below.
time:
'#type': time
'#title': Time
'#description': 'Enter pick-up time using the time picker.'
'#default_value': '08:00'
'#title_display': attribute
'#description_display': invisible
'#size': '50'
'#flex': '5'
'#admin_title': 'Time data'
'#timepicker': true
'#step': '600'
Proposed resolution
Correct the code to give 5 minutes a value of 300.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2928194-2.patch | 622 bytes | jrockowitz |
|
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented