Displaying Calendar Events

Users can display events from the University's Events Calendar using some simple JavaScript. Follow the examples below to display events on your page.

Today's Events

Displaying today's events will show everything from today, whether the events have concluded or not. You may provide an optional Channel ID to highlight a specific subset of events.

var todayCalendar = new UpcomingEvents({
	viewMode: "today"
});
todayCalendar.write();

Output:

Upcoming Events

Displaying upcoming events will show events that will take place over the next several days. You may provide an optional Calendar ID to highlight a specific subset of events.

var upcomingCalendar = new UpcomingEvents({
	viewMode: "upcoming",
	CalendarID: 3
});
upcomingCalendar.write();

You may also use the options maxEvents to limit the number of events to display, or maxDays to limit the number of days' worth of events to display.

Output:

Date Range

"Range" mode will display any events taking place from the start date to the end date (including both the start and end dates).

var rangeCalendar = new UpcomingEvents({
	CalendarID: 3,
	viewMode: "range",
	startDate: "2014-07-01",
	endDate: "2014-07-31"
});
rangeCalendar.write();

Output: