Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This project is not covered by Drupal’s security advisory policy.
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.
Supporting organizations:
Development and maintenance
Project information
- Module categories: Developer Tools
- 35 sites report using this module
- Created by acrollet on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
1.0.0-alpha0
released 3 July 2023
Works with Drupal: ^9 || ^10
Refactored and updated module to D9
Install:
Development version: 1.0.x-dev updated 3 Jul 2023 at 15:14 UTC