Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Null Dates

No security coverage
View on drupal.org

This module enhances Webform date fields by automatically restricting available dates based on custom rules. It allows for complex scheduling logic like blocking weekends, holidays, or enforcing lead times for bookings.

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
4 months ago
Releases (12 mo)
6 ▲ from 0
Maintenance
Active

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