Commit 64bd362d authored by solideogloria's avatar solideogloria Committed by Liam Morland
Browse files

Issue #3063742 by solideogloria, Liam Morland: Make time comparison work for single-digit minutes

parent 18f7c0fa
Loading
Loading
Loading
Loading
+1 −1
Changes for webform_validation.validators.inc: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -638,7 +638,7 @@ function webform_validation_webform_validation_validate($validator_name, $items,
        }
        elseif ($components[$entry[$count]['key']]['type'] === 'time') {
          if (isset($value['hour']) && isset($value['minute'])) {
            $time = $value['hour'] . ':' . $value['minute'];
            $time = $value['hour'] . ':' . str_pad($value['minute'], 2, '0', STR_PAD_LEFT);
            if (!empty($value['ampm'])) {
              $time .= ' ' . $value['ampm'];
            }