SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For some reason the scripts I have found on the web (ie: are not working with a calendar view in a custom list.

All I want to do is auto-expand all in my view when the page loads with some javascript in a CEWP.

Any thoughts or examples of how this has worked?

share|improve this question
up vote 4 down vote accepted

After SP1 for SharePoint 2010 some calendar scripts may stop working. We are using this script to determine when calendar loaded (it includes your expand all requirement):


function WaitForCalendarToLoad() {

    if (typeof SP.UI.ApplicationPages.CalendarNotify.$4a == 'undefined') {
        // post SP1
        var pwold$4b = SP.UI.ApplicationPages.CalendarNotify.$4b;
        SP.UI.ApplicationPages.CalendarNotify.$4b = function () {
    else {
        // pre SP1
        var pwold$4a = SP.UI.ApplicationPages.CalendarNotify.$4a;
        SP.UI.ApplicationPages.CalendarNotify.$4a = function () {
function ColourCalendar() {     

It works for me on December 2011 CU.

share|improve this answer
Totally forgot to say this worked! Thanks a TON!!!!!!! – mjrobichaud Jun 29 '12 at 14:00
Where would you run the script? – user9675 Jul 25 '12 at 17:55
Great solution. One question, how would you terminate the CalendarNotify event? I am doing some coloring after the calendar loads, but cannot get the "Loading Calendar..." DIV do disapear. Thanks Darrell – user10730 Sep 14 '12 at 19:03
This worked GREAT! Thanks for posting, it saved the day for me. – user13813 Dec 28 '12 at 17:31
It worked but when i'm on a list and i click item or list it just keeps showing loading... and doesn't stop. Cheers – naijacoder Sep 8 '13 at 21:06

protected by Community Dec 29 '12 at 10:30

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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