Support optional dates in core datetime_range fields compatible with 9.4.8

Created on 14 November 2022, over 2 years ago
Updated 3 February 2025, 2 months ago

Problem/Motivation

Core datetime_range fields currently require both a start date and end date OOTB. However, the idea that one or both of these could be optional has been accepted in principle by core subsystem maintainers in ✨ Allow end date to be optional Needs review , and is available in contrib in the optional_end_date module.

Smart date's formatters currently don't support this possibility on datetime_range fields, but very easily can.

Proposed resolution

Currently SmartDateTrait causes the formatters to make no attempt to process a core daterange field value unless it has both a start and end date.

Let's change this so that only one of them is required.

✨ Feature request
Status

Needs review

Version

3.6

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine riabovol

Live updates comments and jobs are added and updated live.
Sign in to follow issues

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