Allow end date to be specified as a duration in datetime_range

Created on 30 August 2025, 23 days ago

Problem/Motivation

Currently, datetime_range values must be entered as two dates. I would like to be able to enter a start and duration, such as 2 hours.

Proposed resolution

Create a form display widget which shows a duration field and converts that to the end date when the form is saved. It should be possible to set a default value for the duration without setting a default start date.

Remaining tasks

Implement.

User interface changes

Site builders may select to show a duration field instead of an end date.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

Feature request
Status

Active

Version

11.0 🔥

Component

datetime.module

Created by

🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

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

Comments & Activities

Production build 0.71.5 2024