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). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). 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). 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.

Date Range Widget

7 sites No security coverage
View on drupal.org

This module offers a date field widget that allows for setting minimum and maximum date restrictions, including relative values like "today" or "in 5 days". It's useful for forms that need date validation, such as age verification or event registration, and includes customizable error messages.

Date Range Widget (drw) provides a simple date field widget with min/max validation and support for relative dates like "today" or "-18 years".

Perfect for age verification, event registration, appointment booking, and any form requiring date restrictions.

Key Features:

  • Relative dates: Use -18 years, today, +90 days, etc.
  • Easy configuration: Set restrictions directly in field widget settings: no code needed
  • Custom error messages: Optional personalized validation messages with dynamic placeholders

Common Use Cases:

  • Age verification: Min: -18 years
  • Future dates only: Min: today
  • Event period: Min: 2024-01-01, Max: 2024-12-31
  • Booking window: Min: today, Max: +90 days

Quick Setup:

  1. Go to Manage form display for your content type
  2. Change date field widget to "Date Range Widget"
  3. Click ⚙️ to configure:
    • Set min/max dates (absolute or relative)
    • Check "Enable custom error messages" to personalize validation feedback
    • Use @min and @max placeholders in custom messages

Lightweight & Dependency-Free: No external dependencies, no JavaScript!

Activity

Total releases
8
First release
Nov 2025
Latest release
5 months ago
Releases (12 mo)
8 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.1.3 Stable Jan 31, 2026
1.1.2 Stable Dec 4, 2025
1.1.1 Stable Nov 24, 2025
1.1.0 Stable Nov 23, 2025
1.0.3 Stable Nov 19, 2025
1.0.2 Stable Nov 18, 2025
1.0.1 Stable Nov 17, 2025
1.0.0 Stable Nov 15, 2025