Backend admin interface
Regular Select list date entry
Year, Month pattern
Year only pattern
Datetime range field with year only pattern.

The Partial Datelist module allows site administrators to customize the visibility of the Select list widget by deactivating individual parts of date and date/time components (e.g., year, month, day, hour, minute, second) both in Date and Date Range fields. This is particularly useful for scenarios where only specific parts of a date or time need to be collected (e.g. year only, or year/month).

By integrating with Drupal's widget configuration interface, this module enhances date entry flexibility by providing an intuitive way to hide unwanted dropdowns for simple date and date/time widgets, as well as range fields.

Features

  • Hide specific date parts (e.g., year, month, day) or time parts (e.g., hour, minute, second) in the "Select list" widget.
  • Compatible with both Datetime and Datetime Range field types.
  • Easy configuration through the field widget settings interface.
  • Improves user experience by simplifying date input forms.
  • This module is ideal for use cases where collecting partial date or time information is sufficient, such as year-only fields for historical records.

Upgrading

Version 1.1.x drops this module's outdated procedural hook functions in favor of PHP attribute-based hook implementations (#[Hook]). For those who are upgrading form a previous version (1.0.x), make sure to run database updates (drush updb or visit update.php) right after deploying this version: until that runs, the site may still be relying on a cached reference to the removed functions, thus causing the website to error out.

Supporting organizations: 
ImageX partly funded the time invested in crafting this module.

Project information

Releases