Commit 9f6d9144 authored by alexpott's avatar alexpott

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

parent 6b4e86d4
......@@ -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',
];
}
......
......@@ -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,
......
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment