vkurko / calendar

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

Is it possible to control the position of events in week view? #163

Closed michaelphipps closed 10 months ago

michaelphipps commented 11 months ago

I am using the calendar in week view to roster staff. The image below is an example where being able to order the events would help make the display easier to interpret for staff. The Yellow, Red, and Green colours each represent a staff member. Ideally, I would like to be able to control the way events are displayed so that a staff members shifts are grouped together. So the red shift from 12:00 to 21:00 has the red shift from 21:00 to 22:00 directly underneath it, and the yellow shift from 20:00 to 21:00 has the yellow shift from 21:00 to 0:00 ( it actually spans to 06:00 the following day) underneath it.

Is it possible to control this order so events can group together?

image

vkurko commented 11 months ago

It seems to me that in your case you could achieve the desired result by simply pre-sorting the events in the correct order. Try swapping those two events that start at 21:00 (red and yellow), in theory they should fall into the places you need on the calendar.

vkurko commented 10 months ago

I hope I can close this issue.