vkurko / calendar

Full-sized drag & drop JavaScript event calendar with resource & timeline views
https://vkurko.github.io/calendar/
MIT License
1.36k stars 116 forks source link

Overlapping zero-duration events #377

Open hakonvik opened 1 week ago

hakonvik commented 1 week ago

Hi, this might be a rare scenario but in our usage we occasionally have events with the same start and end time. When rendered it seems they overlap even if slotEventOverlap is set to false.

Here is a codepen illustrating the issue; https://codepen.io/hakonvik/pen/NWQoYVv

The CSS for min-height is a workaround to render an event with at least some height so that the time label is visible.

vkurko commented 1 week ago

If the duration of an event is zero, what do you expect to see? In timeGrid view, the height of an event is equal to its duration, so naturally the event turns into a line if the duration is zero.

hakonvik commented 1 week ago

Thanks for your reply :)

In most calendars I'm familiar with it is possible to have an event with start end end being the same datetime, an example here from Microsoft Teams:

image

The main issue regardless of the event being a line or not is that two events having the same start and end datetime overlap when they shouldn't as far as I can see?