Skip to content

Commit

Permalink
Issue #5703: Set 24-hour date input if "G" in time format.
Browse files Browse the repository at this point in the history
  • Loading branch information
yorkshire-pudding authored and quicksketch committed Sep 15, 2022
1 parent 0e43f67 commit 1cf27c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/modules/date/date.elements.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ function _date_popup_process_time_part(&$element) {
// Add in the timepicker if set.
if ($element['#timepicker']) {
$settings = array(
'show24Hours' => strpos($element['#date_format'], 'H') !== FALSE ? TRUE : FALSE,
'show24Hours' => (strpos($element['#date_format'], 'H') !== FALSE || strpos($element['#date_format'], 'G') !== FALSE) ? TRUE : FALSE,
'showSeconds' => (in_array('second', $granularity) ? TRUE : FALSE),
'timeSteps' => array(1, intval($element['#date_increment']), (in_array('second', $granularity) ? $element['#date_increment'] : 0)),
'fromTo' => isset($fromto),
Expand Down

1 comment on commit 1cf27c0

@backdrop-ci
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.