X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FDatetime%2FElement%2FDatetime.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FDatetime%2FElement%2FDatetime.php;h=bfdaa40bc50303ed508b7247a4ea810281081275;hp=e238ff59693acd8e2bc023f6efb5a5ed43b983eb;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/lib/Drupal/Core/Datetime/Element/Datetime.php b/web/core/lib/Drupal/Core/Datetime/Element/Datetime.php index e238ff596..bfdaa40bc 100644 --- a/web/core/lib/Drupal/Core/Datetime/Element/Datetime.php +++ b/web/core/lib/Drupal/Core/Datetime/Element/Datetime.php @@ -70,8 +70,8 @@ class Datetime extends DateElementBase { */ public static function valueCallback(&$element, $input, FormStateInterface $form_state) { if ($input !== FALSE) { - $date_input = $element['#date_date_element'] != 'none' && !empty($input['date']) ? $input['date'] : ''; - $time_input = $element['#date_time_element'] != 'none' && !empty($input['time']) ? $input['time'] : ''; + $date_input = $element['#date_date_element'] != 'none' && !empty($input['date']) ? $input['date'] : ''; + $time_input = $element['#date_time_element'] != 'none' && !empty($input['time']) ? $input['time'] : ''; $date_format = $element['#date_date_element'] != 'none' ? static::getHtml5DateFormat($element) : ''; $time_format = $element['#date_time_element'] != 'none' ? static::getHtml5TimeFormat($element) : ''; $timezone = !empty($element['#date_timezone']) ? $element['#date_timezone'] : NULL; @@ -181,9 +181,13 @@ class Datetime extends DateElementBase { * dynamic value that is that many years earlier or later than the current * year at the time the form is displayed. Used in jQueryUI datepicker year * range and HTML5 min/max date settings. Defaults to '1900:2050'. - * - #date_increment: 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. + * - #date_increment: 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. * - #date_timezone: The local timezone to use when creating dates. Generally * this should be left empty and it will be set correctly for the user using * the form. Useful if the default value is empty to designate a desired