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.

Archive /

Our old forums are still available as a read-only archive.

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

Calendar Module


Go to End


3 Posts   2282 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

30 May 2008 at 3:48am

Edited: 30/05/2008 3:49am

Just downloaded this from the trunk. Anyone have any idea how to use it?

Avatar
The Frenchy

Core Development Team, 40 Posts

4 June 2008 at 2:33pm

Hi,

This calendar module is just a platform which is supposed to be linked later with the events module !

$monthView = new CalendarMonthView( 'name3', 20 );
		//$monthView->removeWednesday();
		$monthView->showWeekLeft();
		$monthView->showWeekRight();
		$monthView->startBySunday();
	
		$weekView = new CalendarWeekView( 'name5', $number = 6 );
		$weekView->setTimePeriod( new CalendarTimePeriod( new CalendarTime( 8 ), new CalendarTime( 22, 35 ) ));
		$weekView->setSubPeriodsLength( new CalendarTime( 0, 45 ) );
	
		$calendar = new Calendar(
			$this,
			'mycalendar',
			array(
				//new CalendarDayView( 'name1', 6 ),
				/*new CalendarMonthView( 'name3', $number = 2, $month = 6 ),
				new CalendarYearView( 'name4', $number = 3 ),*/
				//$monthView,
				$weekView
			)
		);
		$time1 = new CalendarTime( 22, 48 );
		$time2 = new CalendarTime( 23, 58 );
		$period = new CalendarTimePeriod( $time1, $time2 );
		
		return $calendar;

Avatar
UncleCheese

Forum Moderator, 4102 Posts

4 June 2008 at 2:37pm

Interesting. I was actually thinking about contributing an events module. Is that well underway? If so when might we expect it?