Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295845

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

$
0
0

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

  • Address patch review in #30
  • Issue Summary update (#75)

User interface changes

Content type display:

Content type display

Views:

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.


Viewing all articles
Browse latest Browse all 295845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>