Drupal is a registered trademark of Dries Buytaert

null_dates

No security coverage
View on drupal.org

Null Dates provides intelligent date restriction for Webform date fields, enabling complex exclusion rules for appointment scheduling, service booking, and calendar-based forms. This module has been successfully used in production environments and is now available as a beta release for community testing.

Seamlessly integrates with Webform to provide dynamic date restrictions:

  • Webform element integration that automatically applies date restrictions to date picker fields.
  • Smart Date recurring rule support for complex restriction patterns (weekends, holidays, recurring blackouts).
  • Taxonomy-based configuration with separate vocabularies for activities and restriction types.
  • Lead time enforcement to prevent bookings within N days of today.
  • Automatic date picker integration that disables restricted dates in the user interface.
  • Multi-activity support allowing different restriction sets per activity type on the same form (e.g. inspection, move in, cargo elevator).
  • Pre-configured examples for weekends, nights, holidays.

Primary Use Case: Webform Integration

Null Dates was specifically designed to solve the challenge of restricting available dates in Webform submissions:

  • Service appointment forms: Users can only select dates when the service is available, respecting lead times and operational hours.
  • Utility scheduling: Prevent bookings on weekends, holidays, or during maintenance windows.
  • Event registration: Block dates during recurring maintenance window or for emergency reasons.
  • Resource booking: Enforce availability rules for facilities, equipment, or personnel.
  • Multi-service forms: Different date restrictions per service type on a single form.

How It Works

  1. Configure restriction types (e.g., "Holiday", "Off hours", "Maintenance") at /admin/structure/date_restriction_type
  2. Define activities (e.g., "Service", "Emergency") with lead times at /admin/structure/taxonomy/manage/date_activity
  3. Create date restrictions using Smart Date fields with recurring rules at /admin/content/date_restriction
  4. Use in Webform - date fields automatically respect the configured restrictions

Example Configuration

Out of the box, the module includes production-ready restriction patterns:

  • Weekends: Recurring Saturday/Sunday restrictions from 2022-2031.
  • Nights: Daily restrictions for weekday nights (before 8am and after 5pm).
  • Holidays: Restrictions for commonly observed U.S. holidays:
    • New Year's Day
    • Martin Luther King Jr. Day
    • Presidents Day
    • Memorial Day
    • Juneteenth
    • Independence Day
    • Labor Day
    • Columbus Day
    • Veterans Day
    • Thanksgiving
    • Christmas Day
  • Activity-specific lead times: Service types with configurable advance booking requirements (e.g., 2-day lead time for standard service, 0 days for emergencies).

Installation & Configuration

  1. Install with Composer: composer require drupal/null_dates
  2. Enable the module: drush en null_dates -y
  3. Configure restriction types at /admin/structure/date_restriction_type
  4. Define activities at /admin/structure/taxonomy/manage/date_activity
  5. Create date restrictions at /admin/content/date_restriction
  6. Use Webform date fields - restrictions are automatically applied

Requirements: Drupal 10.3+, Webform module, Smart Date module, dx_toolkit module

Note: This is a Beta release intended for community testing. While the module has been used in production environments, you may encounter issues in different configurations. Please report any bugs or feature requests to the issue queue.

Activity

Total releases
6
First release
Feb 2026
Latest release
1 week ago
Release cadence
2 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.0.0-beta5 Pre-release Feb 19, 2026
1.0.0-beta4 Pre-release Feb 9, 2026
1.0.0-beta3 Pre-release Feb 8, 2026
1.0.0-beta2 Pre-release Feb 8, 2026
1.0.0-beta1 Pre-release Feb 8, 2026
1.0.x-dev Dev Feb 8, 2026