Problem/Motivation
Fullcalendar has a displayEventTime property which controls whether or not to display the text for an event’s date/time. Some sites may not want the times shown for any listings, but more importantly it would allow for additional options on how the times should be displayed.
Currently the times are rendered by Moment.js, but as identified in #3228517: Timezones and Fullcalendar View there isn't currently a way to pass in the timezone, which means that format strings which include a timezone indicator will only ever show the site/calendar value, even when a specific event is meant to be in a different timezone.
Also, the default formatting only shows the minutes when not on the hour, but when using a custom Moment.js format string, a site builder can only choose to display minutes always or never. If Fullcalendar View could be configured to suppress the default time render using displayEventTime, it would be possible to prepend the title display with time rendering from Smart Date, which can support custom strings as well as the ability to only show minutes on the hour, as well as the correct timezone for the event. This could be accomplished using the capability to define custom strings that is already built into Views.
Remaining tasks
Add a configuration option to the display. If set, pass the value to Fullcalendar.
User interface changes
Add a configuration option.
Data model changes
Add the new option to the configuration schema.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | Screen Shot 2022-03-03 at 8.27.18 AM.png | 198.17 KB | karing |
| #3 | Screen Shot 2022-03-02 at 5.18.10 PM.png | 373.08 KB | karing |
| #3 | Screen Shot 2022-03-02 at 5.16.01 PM.png | 139.15 KB | karing |
Issue fork fullcalendar_view-3260799
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mandclu commentedComment #3
karingHi @mandlu -> I discussed this with my team and one of our dev pointed out that this is actually already possible.
In Settings -> change the Time Format settings -> to
[ ]Then you can make Title anything you want -> in this example -> my Title is field Smart Date -> and this is my Smart Date Format (which includes Timezone) ->
Comment #4
karingComment #5
mandclu commentedThis is exciting news! I can confirm this works also:

That said, I expect there is still some wasted front end overhead, since Moment.js is likely still looping over every row and trying to generate a time label. I would personally still be in favour of having an explicit checkbox, also because it makes for a better site building experience.
Comment #6
karing@mandlu - agreed, this is not efficient. But it's a safe way to gain full control over the label and that solves the immediate problem.
I think we have two steps:
1. [now] - add set to [ ] + explain in the help/description in the Settings screen - main goal: get full control over the labels
2. [ToDo] - provide an option on the Settings screen to take Moment.js out the equation - main goal: better performance
I'm going to work on 1 right now.
Comment #7
karingPS - of course if one wants to do so - you can now also completely remove anything with Time from the label ->
Comment #9
karingOk 1. is done:
MR is up -> https://git.drupalcode.org/project/fullcalendar_view/-/merge_requests/26...
Comment #10
karing@mandlcu and @minsong -> does the wording look ok to you?
Comment #11
karingComment #14
mingsongLooks good to me.
Thank you.