Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment