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.

CommentFileSizeAuthor
#2 2928194-2.patch622 bytesjrockowitz
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

taxicab221 created an issue. See original summary.

jrockowitz’s picture

Status: Active » Needs review
FileSize
622 bytes

  • jrockowitz committed e7e81df on 8.x-5.x
    Issue #2928194 by jrockowitz: Time Element Step
    
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.