-
Hello! I would like to daily order the events on my calendar based on the column "livello" of the model. This column is an integer and I show it in every event. For every day of the calendar I would like to see the events ordered by this number (1, 1, 1, 2, 3, 4, 5 ecc.). Anybody got any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi there, sorry for the late reply. The events are ordered by start time on the calendar, but you're not forced to show the start time. I think this should work; implement the
This might be overly safe; you could skip the |
Beta Was this translation helpful? Give feedback.
-
Great! Thank you! |
Beta Was this translation helpful? Give feedback.
Hi there, sorry for the late reply.
The events are ordered by start time on the calendar, but you're not forced to show the start time.
So if only the day is relevant, you could abuse the time field to force an ordering of your choice.
I think this should work; implement the
customizeEvent
method in your CalendarController as follows:This might be overly safe; you could skip the
if($event->model())
check if your event generator already guarantees that each calendar eve…