1

I've got an Calendar with a number of views and overlays. The default is set to a weekly view and I've been asked to provide a way to switch between a weekly and monthly view. Is there a way of doing this.

3

Switching between weekly and monthly view is available from the ribbon (Calendar tab, Scope section).

Please see the following screenshots (month and week view):

Month view

Week view

Update:

In order to change views (between month, day, week) without using the ribbon, i will suggest the following options:

Using Javascript

The following functions are responsible for this:

<input name="Week" type="button" value="Week" onclick="javascript:MoveView('week');  />
<input name="Day" type="button" value="Day" onclick="javascript:MoveView('day');  />
<input name="Month" type="button" value="Month" onclick="javascript:MoveView('month');  />

A "no-code" solution:

Add the following endings to your initial URL in order to change views:

/?CalendarPeriod=day

/?CalendarPeriod=week

/?CalendarPeriod=month

For example, the URL https://server/Lists/TestCal/calendar.aspx/?CalendarPeriod=day will switch the view to day an so on.

  • Cheers, Is there a way for a user to switch views without using the ribbon? – Dazza May 18 '17 at 9:46
  • I will suggest using javascript. The following functions are responsible for this: MoveView('day'); for Day View, MoveView('month'); for Month View, MoveView('week'); for Week View. Try it via browser console. – Sergey May 18 '17 at 9:57
  • Also you can add the following endings to your initial URL in order to change views: /?CalendarPeriod=day, /?CalendarPeriod=week, /?CalendarPeriod=month. For example, server/Lists/TestCal/calendar.aspx/?CalendarPeriod=day will switch the view to day an so on. – Sergey May 18 '17 at 10:10
  • Cheers that works! – Dazza May 18 '17 at 12:23
  • Hi, I've updated my initial answer, please mark it as good answer if you're satisfied, thanks. – Sergey May 18 '17 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.