Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Multi-day Events on Event Calendar


Go to End


5 Posts   2032 Views

Avatar
cumquat

Community Member, 201 Posts

9 June 2009 at 10:07pm

Hi there, I’ve just started to play with the event calendar module and it all looks great and is working fine, but I was wondering if anybody can tell me a way of when I make a multi-day event that if you click on one of the days in that event that it would show the event, ok this may sound confusing what I mean is if I put an event in from 1st July to 10th July it appears on the 1st of July but not on any of the following dates.

I’m trying to use this for a friend’s place they want to let out as a holiday let.

Cheers

Mick

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 June 2009 at 1:35am

We struggled with this. We found that the concept of "Multi-day event" meant different things to different users. For instance, an all weekend workshop could be entered as 10 July - 12 July. It comes up on the calendar on the day it starts. The other two days are confusing calendar entries because one cannot go to the workshop after it has started. Another example is something like, "John's Vacation." I only need to know when his vacation starts. Seeing the entry seven times in a row gets a little redundant. So think of start date / end date as the span of a single event, not a series thereof.

Now, of course, we had users with your idea of a multi-day event, and rightfully so. You want multiple entries in your calendar. What we found is that this could be quite easily serviced by the repeating events functionality of the calendar. That is, if you assign a start date and and end date, and repeat the event every day, you end up with successive calendar insertions. To me, it's actually a much clearer metaphor. From 1 July to 10 July, you're actually repeating the same content, not spanning a 10-day block of time.

Does that make sense?

Avatar
cumquat

Community Member, 201 Posts

10 June 2009 at 2:55am

That all makes sense to me and seems like it could be a solution cheers for that much appreciated.

Mick

Avatar
bonesbrigade

Community Member, 10 Posts

4 August 2009 at 7:57pm

This doesn't work for large multi day events though. We can't ask our content editors to do a 'repeating event' for a 3 or 4 month long exhibition.

Is there a button for this somewhere that I don't see? Or is the only way to make a repeating event by adding it more than once?

Avatar
bonesbrigade

Community Member, 10 Posts

4 August 2009 at 8:28pm

Ended up changing the code for my needs:

if($announcements = DataObject::get(
$this->getEventDateTimeClass(),
"CalendarID={$this->ID} AND StartDate <= '".$this->start_date->date()."' AND EndDate >= '".$this->start_date->date()."'$where",
"StartDate ASC"
)) {

foreach($announcements as $announcement)
	$event_list->push($announcement);
}