Datetime::getHtml5DateFormat

protected static Datetime::getHtml5DateFormat($element) Retrieves the right format for a HTML5 date element. The format is important because these elements will not work with any other format. Parameters string $element: The $element to assess. Return value string Returns the right format for the date element, or the original format if this is not a HTML5 element. File core/lib/Drupal/Core/Datetime/Element/Datetime.php, line 392 Class Datetime Provides a datetime element. Namespace Dr

Datetime::formatExample

public static Datetime::formatExample($format) Creates an example for a date format. This is centralized for a consistent method of creating these examples. Parameters string $format: Return value string File core/lib/Drupal/Core/Datetime/Element/Datetime.php, line 372 Class Datetime Provides a datetime element. Namespace Drupal\Core\Datetime\Element Code public static function formatExample($format) { if (!static::$dateExample) { static::$dateExample = new DrupalDateTime();

Datetime::$dateExample

Type: \DateTimeInterface File core/lib/Drupal/Core/Datetime/Element/Datetime.php, line 20 Class Datetime Provides a datetime element. Namespace Drupal\Core\Datetime\Element Code protected static $dateExample;

datetime.views.inc

Provides views data for the datetime module. File core/modules/datetime/datetime.views.inc Functions Name Description datetime_field_views_data Implements hook_field_views_data().

datetime.module

Field hooks to implement a simple datetime field. File core/modules/datetime/datetime.module Functions Name Description datetime_date_default_time Sets a consistent time on a date without time. datetime_help Implements hook_help(). Constants Name Description DATETIME_DATETIME_STORAGE_FORMAT Defines the format that date and time should be stored in. DATETIME_DATE_STORAGE_FORMAT Defines the format that dates should be stored in. DATETIME_STORAGE_TIMEZONE Defines th

datetime-wrapper.html.twig

Default theme implementation of a datetime form wrapper. Available variables: content: The form element to be output, usually a datelist, or datetime. title: The title of the form element. title_attributes: HTML attributes for the title wrapper. description: Description text for the form element. required: An indicator for whether the associated form element is required. See also template_preprocess_datetime_wrapper() File core/modules/system/templates/datetime-wrapper.html.twig Rela

datetime-form.html.twig

Default theme implementation of a datetime form element. Available variables: attributes: HTML attributes for the datetime form element. content: The datelist form element to be output. See also template_preprocess_datetime_form() File core/modules/system/templates/datetime-form.html.twig Related topics Theme system overview Functions and templates for the user interface that themes can override.

Datetime

Provides a datetime element. Plugin annotation @FormElement("datetime") Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterfaceclass \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Render\Element\RenderElement implements ElementInterfaceclass \Drupal\Core\Render\Element\FormElement implements FormElementInterfaceclass \Drupal\Core\Datetime\Element\DateElementBaseclass \Dru

Datelist::valueCallback

public static Datelist::valueCallback(&$element, $input, FormStateInterface $form_state) Validates the date type to adjust 12 hour time and prevent invalid dates. If the date is valid, the date is set in the form. Overrides FormElement::valueCallback File core/lib/Drupal/Core/Datetime/Element/Datelist.php, line 46 Class Datelist Provides a datelist element. Namespace Drupal\Core\Datetime\Element Code public static function valueCallback(&$element, $input, FormStateInterface $f

Datelist::validateDatelist

public static Datelist::validateDatelist(&$element, FormStateInterface $form_state, &$complete_form) Validation callback for a datelist element. If the date is valid, the date object created from the user input is set in the form for use by the caller. The work of compiling the user input back into a date object is handled by the value callback, so we can use it here. We also have the raw input available for validation testing. Parameters array $element: The element being processed. \D