A friend asked me if there was a way to specify the start date for a calendar in SharePoint. The specific use case involved sending users to a shared SharePoint calendar and allowing them to list the events they are attending at a convention. The convention exists in the future, but upon navigating to the calendar, users are taken to today’s date. As such, users had to navigate to the date of the convention and then schedule their events.
SharePoint does not provide a way to limit the range of calendar events out-of-the-box. Like all things SharePoint, the calendar is a list; however, items in the list are displayed on top of an existing layer of data, or the pre-determined collection of “allowed” calendar dates, which consists of 365 days in each year, etc.
While there is no way to create a calendar in which this “allowed dates” set can be limited (without custom development), there is a way to send users directly to a specific date by modifying the URL to the calendar.
The default calendar URL looks something like this:
By adding the following to the URL, you can specify the date range to show the user, as well as the “time period” (month/week/day) to display:
Note: Query string parameters are added following a question mark (?); if more than one parameter is specified, additional parameters must be separated by an ampersand (&).
Placing a similarly-constructed URL on the Quick Launch sidebar gives us a way to quickly send users to a specific date range on the calendar list, and fits our use case quite nicely in that the calendar itself is not modified, but the user is directed to the dates on which the conference takes place.
Note that specifying “week” as the CalendarPeriod parameter will automatically display the work week to which the CalendarDate parameter belongs. To modify the day/hour range of a standard work week, modify the Regional Settings from the Site Settings page.