Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
With the addition of End dates coming in 8.2.x #2161337: Add a Date Range field type with support for end date, I propose we look at implementing the functionality in the D7 Module Date Single Day, which adds a widget to only display the End time for date fields which start and end on the same date.
Obviously this will depend on the Date Range functionality entering core, which seems to be nearing completion.
Comments
Comment #2
mpdonadioCan you clarify what you mean here? Are you talking about Widgets (data entry) or Formatters (data display). Right now, with the proposed patch to core, the formatters will only display the end date when the start and end are different (all-day is a little different since the start time is always 0:00 and the end time is 23:59, so start and end will always be displayed with the core formatters). All-day and date-only are distinct so we can have a timezone aware and timezone agnostic version of the range field.
Comment #3
bverc CreditAttribution: bverc as a volunteer commentedSure.
The Date Single Day module provides a data-entry widget to remove the "End Date" field on dates when only end time is desired. This makes the presentation a bit better for users who will be entering dates for events that always start and finish on the same day.
Currently there appears no plans to implement a D8 version of this simple module. But I think this functionality would be best implemented here anyway.
Comment #4
bverc CreditAttribution: bverc as a volunteer commentedComment #5
mpdonadioOk. Makes sense now, and would be a great widget to add.
Comment #6
P2790 CreditAttribution: P2790 commentedAny updates on this?
Comment #7
heddnDrupal is a do-ocrasy. Until someone does something, nothing gets done. Waiting on a patch.
Comment #8
Andriy Khomych CreditAttribution: Andriy Khomych as a volunteer commentedSeems, nobody didn't do any changes in this issue, I've made a module with such functionality - https://www.drupal.org/project/date_time_day
Comment #9
P2790 CreditAttribution: P2790 commentedThanks Andriy
Comment #10
heddnAny chance of moving date_time_day into here? Combine forces? I don't think we have problems adding additional maintainers to this project.
Comment #11
Andriy Khomych CreditAttribution: Andriy Khomych as a volunteer commentedHi Lucas Hedding, I think we can discuss this in private messenger, did you have the account on drupal.org Slack channel? If yes, please, ping me in Slack, my nickname is -
andriy.khomych
. Then we can decide a time for short and brief discussion.Comment #12
heddnI'm heddn in irc or slack.
Comment #13
brad.bulger CreditAttribution: brad.bulger commentedWas this in reference to "Date and time" fields, or just for "Date only" fields? Like, should a range of 9/12/2018 10 AM to 9/12/2018 11 AM currently only display the date once? If not now, are there plans to make that happen?