I have a request to make the calendar web part static.

Not allow users to change the month or click back to the previous week.

Is this possible?


You can hide it using CSS. Edit the calendar.aspx page and add the following CSS either using Content Editor webpart or Snippet/Script web part.

    /* Hides Left Nav Small Calendar, Left/Right Nav(arrow) and Ribbon Tab for changing Scope(Year, Month, Week) */
    div.ms-core-navigation #DatePickerDiv, 
    div.ms-acal-header a[id$="nav_prev_a"], 
    div.ms-acal-header a[id$="nav_next_a"], 
    li[id$="Calendar.Scope"] {
        display: none !important;

Also, go to the list settings and change the default scope to 'WEEK'.

In addition to hiding using the CSS, use the jQuery code as suggested by Jussi.


There is no straightforward water-proof way of doing that, but I'd use jQuery to clear the required HREFs and ONCLICKs.

So something like:

// Disable small month table navigation
$("#DatePickerDiv a").attr("href", "#");

// Remove month/week navigation
$("#AsynchronousViewDefault_CalendarView a[id$='nav_prev_a']").remove();
$("#AsynchronousViewDefault_CalendarView a[id$='nav_next_a']").remove();

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.