Skip to content
Snippets Groups Projects
Unverified Commit dee0eb28 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2944552 by mpdonadio, bhanuprakashnani, liquidcms, Sophie.SK,...

Issue #2944552 by mpdonadio, bhanuprakashnani, liquidcms, Sophie.SK, tacituseu: Documentation for #default_value in Date form element is incorrect
parent d7183eea
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
......@@ -9,16 +9,15 @@
* Provides a form element for date selection.
*
* Properties:
* - #default_value: An array with the keys: 'year', 'month', and 'day'.
* Defaults to the current date if no value is supplied.
* - #default_value: A string for the default date in 'Y-m-d' format.
* - #size: The size of the input element in characters.
*
* @code
* $form['expiration'] = array(
* $form['expiration'] = [
* '#type' => 'date',
* '#title' => $this->t('Content expiration'),
* '#default_value' => array('year' => 2020, 'month' => 2, 'day' => 15,)
* );
* '#default_value' => 2020-02-05',
* ];
* @endcode
*
* @FormElement("date")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment