Russell gove
Russell gove

Reputation:

How do I set the date to be displayed in a sharepoint calendar

I have a Teamsite that is built around an event that occur in a certain week, The site contains a calendar with the activities for that week.I want to have the calendar display default to showing that week, rather than the current week. Can this be done out of the box?

Upvotes: 2

Views: 12078

Answers (2)

Toni Frankola
Toni Frankola

Reputation: 1667

Calendar view always shows current week/month and there are no OOTB way to change that. I would recommend displaying your events in All events view. It is not as fancy as calendar view but I think I would be great for your scenario. Use your browser to add Calendar web part to home page of your site, edit properties of that web part and change web part view from "Calendar" to "All events".

Calendar as All Events view on a Team Site
(source: sharepointusecases.com)


If you still need to display everything in a calendar, fire-up Visual Studio and create your own. The problem with default web part is it's CAML query. It can only accepts static time range values e.g. Current Month. In order to achieve what you want you will have to create dynamic CAML query to retrieve what you need. Take a look at this article for ideas.

Upvotes: 1

dahlbyk
dahlbyk

Reputation: 77540

The view can't be modified to default to a certain date, but you can use query string parameters to make a direct link to the desired week and view. For example, you could modify the Quick Link to point directly to /Lists/Calendar/calendar.aspx?CalendarDate=8/24/2009&CalendarPeriod=week.

Upvotes: 4

Related Questions