Commit 9f6d9144 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2528482 by googletorp, mpdonadio, TR: Fix notice in Date::processDate

parent 6b4e86d4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@ public function getInfo() {
      '#process' => [[$class, 'processDate']],
      '#pre_render' => [[$class, 'preRenderDate']],
      '#theme_wrappers' => ['form_element'],
      '#attributes' => ['type' => 'date'],
      '#date_date_format' => 'Y-m-d',
    ];
  }

+1 −1
Original line number Diff line number Diff line
@@ -533,7 +533,7 @@ function testDisabledElements() {
    // All the elements should be marked as disabled, including the ones below
    // the disabled container.
    $actual_count = count($disabled_elements);
    $expected_count = 41;
    $expected_count = 42;
    $this->assertEqual($actual_count, $expected_count, SafeMarkup::format('Found @actual elements with disabled property (expected @expected).', array(
      '@actual' => count($disabled_elements),
      '@expected' => $expected_count,
+9 −0
Original line number Diff line number Diff line
@@ -142,6 +142,15 @@ public function buildForm(array $form, FormStateInterface $form_state) {
      '#date_timezone' => 'Europe/Berlin',
    );

    $form['disabled_container']['disabled_container_date'] = array(
      '#type' => 'date',
      '#title' => 'date',
      '#default_value' => '2001-01-13',
      '#expected_value' => '2001-01-13',
      '#test_hijack_value' => '2013-01-01',
      '#date_timezone' => 'Europe/Berlin',
    );


    // Try to hijack the email field with a valid email.
    $form['disabled_container']['disabled_container_email'] = array(