vkurko/calendar

eventTimeFormat: Take range as an input rather than individual time?

Closed this issue · 3 comments

As of now, it seems that this function takes in a single parameter and runs twice for each event (once for start and once for end). Would it be possible to have a variation of this function that takes the range (start and end time), which would allow for using something like Intl.DateTimeFormat.formatRange to create the date? I am thinking of a scenario in which the event time could be displayed on the calendar as, for example, "5:00 - 5:30 PM" rather than "5:00 PM - 5:30 PM". This is a little more concise and could save some space on smaller screen sizes,

vkurko commented

This is a good idea. I'll think about how I can add such a setting. In the meantime, you can use eventContent to have full control over the rendering of events and display the time yourself as needed.

vkurko commented

In v2.0.0 the eventTimeFormat now receives 2 parameters for the time span to be formatted. Please check.

vkurko commented

I hope I can close this issue.