diff --git a/core/lib/Drupal/Core/Datetime/Element/Datetime.php b/core/lib/Drupal/Core/Datetime/Element/Datetime.php index a68927a..2758017 100644 --- a/core/lib/Drupal/Core/Datetime/Element/Datetime.php +++ b/core/lib/Drupal/Core/Datetime/Element/Datetime.php @@ -269,6 +269,7 @@ public static function processDatetime(&$element, FormStateInterface $form_state '#size' => max(12, strlen($element['#value']['date'])), '#error_no_message' => TRUE, '#date_date_format' => $element['#date_date_format'], + '#states' => isset($element['#states']) ? $element['#states'] : [], ); // Allows custom callbacks to alter the element. @@ -301,6 +302,7 @@ public static function processDatetime(&$element, FormStateInterface $form_state '#required' => $element['#required'], '#size' => 12, '#error_no_message' => TRUE, + '#states' => isset($element['#states']) ? $element['#states'] : [], ); // Allows custom callbacks to alter the element.