public static function AttributeHelper::defaultWidget in Single DateTimePicker 8
Attributes for textfield (or any non single_datetime field types).
Return value
array Return attributes.
2 calls to AttributeHelper::defaultWidget()
- AttributeHelper::defaultDateOnlyWidget in src/
AttributeHelper.php - Date only widget - for non single_datetime field types.
- single_datetime_exposed_form_views_exposed_form_alter in modules/
single_datetime_exposed/ single_datetime_exposed.module - Implements hook_form_BASE_FORM_ID_alter().
File
- src/
AttributeHelper.php, line 20
Class
- AttributeHelper
- Class AttributeHelper.
Namespace
Drupal\single_datetimeCode
public static function defaultWidget() {
return [
'data-hour-format' => 24,
'data-first-day' => \Drupal::config('system.date')
->get('first_day'),
'data-allow-seconds' => FALSE,
'data-disable-days' => [],
'data-allow-times' => 60,
'data-allowed-hours' => Json::encode(range(0, 23)),
'data-inline' => '0',
'data-mask' => FALSE,
'data-datetimepicker-theme' => 'default',
'data-single-date-time' => 'datetime',
];
}