Add option to show only start or end date in the DateTime Range custom formatter

Created on 14 November 2016, about 8 years ago
Updated 5 August 2024, 4 months ago

Problem/Motivation

Currently, date range fields are always displayed with start and end date.

There are situations where only one of these values should be displayed, e.g. when creating a view for upcoming events where we only want to show the start date.

Proposed resolution

Add an option to the date range formatter to select both start and end date (default), only start date or only end date.
Show the separator field only when the first option is selected.

Remaining tasks

  • (#75)

User interface changes

Content type display:

Views:

API changes

Data model changes

New from_to configuration setting.

Release notes snippet

You can now customize the way date ranges are displayed to match your specific needs. The new display option offers three choices:

  • Start and End Date (Default): This is the default behavior, displaying both the start and end dates in your date ranges, just as you've always seen.
  • Start Date Only: Choose this option to display only the start date in your date ranges. This is perfect for situations where you want to highlight the beginning of an event or a period.
  • End Date Only: Opt for this format if you wish to showcase only the end date in your date ranges. It's ideal when you want to emphasize the conclusion of an event or a time frame.

This new feature offers increased flexibility, making it easier to tailor your date range presentations to your site's unique requirements.

โœจ Feature request
Status

Fixed

Version

10.3 โœจ

Component
Datetimeย  โ†’

Last updated 2 days ago

Created by

๐Ÿ‡ช๐Ÿ‡ธSpain rodrigoaguilera Barcelona

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024