Date Timepicker
This module integrates popular jQuery timepicker plugins into Drupal's date and time fields. It allows you to configure and extend the functionality for various date and time input scenarios.
The Date Timepicker module — a new project wearing the OPTASY team's signature — adds one of the 3 most popular jQuery plugins to any DateTime field in the Widget settings.
Providing custom options for each plugin and being conveniently extensible, as well, it makes a “tool” that easily adapts to all date/time field customization scenarios.
For other “samples” of our work so far, as a Drupal team, pay us a visit on Twitter or LinkedIn.
Features:
- Supports the most popular Timepicker jQuery plugins
- Provides custom options for each plugin support
- Its functionality can be extended (adding your own custom jQuery plugins) via a custom-built module with the hook_timepicker_libraries()
Available Timepicker plugins
Installation
Install the module, then load the following libraries:
- The Jonthornton jQuery Timepicker download and extract into "/libraries/jonthornton-jquery-timepicker" folder.
- The jQuery UI Timepicker download and extract into "/libraries/jquery-ui-timepicker" folder.
- The jQuery Timepicker Addon download and extract into "/libraries/jquery-timepicker-addon" folder.
- The jQuery Timepicker Addon
- The FlatpickrJS and extract into "/libraries/flatpickr" folder.
You can also use the library repositories found in composer.libraries.json and add them in your composer.json file.
NOTE: Using the Composer manager dependencies you must use the following to install the Timepicker:
composer require drupal/timepicker-timepicker
or check the releases page for corresponding release option.
How to use
- Go to the Manage form display page of the entity type with a Date field in question (where the given field should be of "Date/Time" data type)
- Select the "Date and Time" widget type
- Use the widget's settings for enabling the Timepicker, choose your Timepicker type, then apply custom options.