This module adds a date range picker form element to Drupal, similar to the one used in Google Analytics. It allows users to select date ranges with customizable text and formatting options.
Adds a "Google Analytics alike" date range picker integration as a module. Uses this library: http://tamble.github.io/jquery-ui-daterangepicker
It provides a #daterangepicker form element with some options:
$element['range'] = array(
'#type' => 'daterangepicker',
'#DateRangePicker_options' => array(
'initial_text' => t('Select date range...'),
'apply_button_text' => t('Apply'),
'clear_button_text' => t('Clear'),
'cancel_button_text' => t('Cancel'),
'range_splitter' => ' - ',
'date_format' => 'd M, yy',
// This needs to be a format recognised by javascript Date.parse method.
'alt_format' => 'yy-mm-dd',
'date_picker_options' => array(
'numberOfMonths' => 2,
),
),
);
Dependencies:
- moment.js module (and moment.js library)
- jQuery UI datepicker library
- Libraries module (optional)
Roadmap:
- Add FieldAPI integration
- Expose more datepicker / date range options
Get in touch with us for customizations and consultancy.
Ask your assistant about Jquery UI Date Range Picker
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0-alpha0 | Pre-release | 9–10 | Jul 3, 2023 | ||
| 1.0.x-dev | Dev | 9–10 | Jul 3, 2023 |