function date_datepicker_formats in Date 8
Format options array.
TODO Remove any formats not supported by the widget, if any.
3 calls to date_datepicker_formats()
- DateFieldWidgetBase::formatOptions in date_field/
lib/ Drupal/ date_field/ Plugin/ field/ widget/ DateFieldWidgetBase.php - Return the format options used by this widget.
- DateTextWidget::settingsForm in lib/
Drupal/ date/ Plugin/ field/ widget/ DateTextWidget.php - Implements Drupal\field\Plugin\Type\Widget\WidgetInterface::settingsForm().
- DateWidgetBase::formatOptions in lib/
Drupal/ date/ Plugin/ field/ widget/ DateWidgetBase.php - Return the format options used by this widget.
File
- date_api/
date_api.module, line 18 - This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.
Code
function date_datepicker_formats() {
$formats = str_replace('i', 'i:s', array_keys(system_get_date_formats('short')));
$formats = drupal_map_assoc($formats);
return $formats;
}