Bootstrap Materialize DateTime Picker
This module provides a Material Design date and time picker widget for Drupal's date fields. It can also be used for custom form elements, offering features like multilingual support, responsive design, and configurable options for time format, minute granularity, and date restrictions.
OVERVIEW
Drupal 8/9/10/11 Bootstrap Materialize DateTime picker. Bootstrap Materialize DateTime Picker module provides a widget for Drupal Date fields.
Also we can add Materialize DateTime picker to any custom form by using field type as a materialize_date_time.
For Example :
$date_format = 'Y-m-d H:i';
$form['dateAndTime'] = [
'#type' => 'materialize_date_time',
'#title' => t('Start Date'),
'#date_format' => $date_format,
'#default_value' => \Drupal\Core\Datetime\DrupalDateTime::createFromTimestamp(time()),
'#weight' => '3',
];
Note: We can configure Materialize DateTime picker for custom form by using configuration form admin/config/materialize/datetime_picker_config
INSTALLATION & USAGE
- Download this module by this link.
- Place materialize_datetime_picker module into your modules directory.
- Go to admin/modules. Enable Bootstrap Materialize DateTime Picker module.
- See README.md file for the installation and usage documentation.
FEATURES
- Widget works for both date and datetime fields
- Supports Multilingual for both Date and Time pop-ups
- Responsive
- Supports 12 and 24 hour time formats
- You can specify granularity for minutes
- Disable dates for specific days
- You can specify week start days
- Disable specific dates by using manage form display