Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Date.php

function Date::getInfo

Overrides ElementInterface::getInfo

File

core/lib/Drupal/Core/Render/Element/Date.php, line 42

Class

Date
Provides a form element for date or time selection.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
    $class = static::class;
    return [
        '#input' => TRUE,
        '#theme' => 'input__date',
        '#process' => [
            [
                $class,
                'processAjaxForm',
            ],
        ],
        '#pre_render' => [
            [
                $class,
                'preRenderDate',
            ],
        ],
        '#theme_wrappers' => [
            'form_element',
        ],
        '#attributes' => [
            'type' => 'date',
        ],
        '#date_date_format' => 'Y-m-d',
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal