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.

This module provides a field formatter for Date fields that wraps date and time segments in HTML elements with customizable class names. This allows for more advanced styling and layout control of displayed dates, and adds an "is-past" class for dates that have already occurred.

Provides a formatter for Date fields that outputs date and time segments with in -elements with specified class names, enabling advanced styling and layout control.

Features

The Date HTML Segmentation Formatter adds a new field formatter for the Date and Smart Date field types.
It separates start and end dates into distinct HTML elements as well as a customisable separator between both, giving site builders and themers full control over markup and styling.

Additionally, the selector 'is-past' will be added if the date is in the past.

Post-Installation

After installing and enabling the module:

  1. Go to Structure » Content types » Manage display for an entity that uses a (Smart) Date field.
  2. Select Date HTML Segmentation Formatter as the formatter.
  3. Optionally adjust display settings such as wrapper tags or separator characters (if provided) or use the custom values.

Then style the generated markup in your theme’s CSS or via custom templates.

Additional Requirements

No additional requirements.

Activity

Total releases
3
First release
Oct 2025
Latest release
9 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Release date
1.0.1 Stable Oct 17, 2025
1.0.0 Stable Oct 16, 2025
1.0.x-dev Dev Oct 15, 2025