Closed (fixed)
Project:
Optional End Date
Version:
8.x-1.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 May 2020 at 16:20 UTC
Updated:
20 Jun 2022 at 08:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
chipway commentedconfiguration panel
and the example panel that seems to work
Comment #3
birk commentedI assume you're using the daterange_compactr module, to set the range formats?
If so do you get any error messages?
My guess is the module doesn't check for missing end dates (since it's not a standard part of core). So when the end date is missing, something goes wrong.
I don't know your usecase - and I don't know if it works with empty end dates - but there's a nother range foramtter module: https://www.drupal.org/project/date_range_formatter perhaps it works. (Or maybe the date extra module has something).
Let me know if any of the other modules work, if not I'll look into providing a patch for one of them.
Comment #4
chipway commented@Birk,
Yes in fact this site uses daterange_compact module.
I will test date_range_formatter and let you know.
Thanks for the tip.
Comment #5
chipway commented@Birk,
I replaced daterange_compact module by date_range_formatter and found it more versatile.
But I still have the issue. I will wait for Core patch https://www.drupal.org/project/drupal/issues/2794481 when ready, and I am hearing for any other fix while waiting.
Big Thank for your help.
Comment #6
birk commented--- This patch is NOT for optional_end_date ---
I've included a patch for the date_range_formatter module, so it renders dates without an end date as single day dates.
Note that I did not create a new issue in the date_range_formatter module, that would make it dependent on the current way of implementing optional end dates, which could (not very likely) change in the future.
Comment #8
calinh commentedHi, I have applied the patch and got this: Duminică 26 Iunie 10:00-{10}:{00} for this empty end date:

Comment #9
birk commentedI don't have time at the moment to look into this. And my knowledge of the Date range formatter is limited, since I've never used it my self.
Maybe open an issue for the date range formatter, asking if the maintainer could prepare the module for #2794481: Allow end date to be optional, that should fix the problem since this module still hits close enough to the current patch in the core issue.
Feel free to add this issue as a related issue, and maybe my previous patch is easily adapted to the newer date range foramtter versions.