Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

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.

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

Tracked releases
6
Tracked since
Feb 2026
Latest release
6 months ago
Releases (12 mo)
6 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

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