0
votes

I've coded a tooltip script for a Sharepoint calendar that works great up until the month is manually changed. That is, when you load the page, the tooltips display fine, but when you use the arrows to go to the next or previous months, then the javascript breaks. I'm fairly certain this is because of the MoveToDate javascript that is run, but I can't figure out how to fix the problem. Ideally, there would be some way to run the script that runs on page load after the MoveToDate script is run. Is that even possible?

Here's the site: http://www.austin.k12.mn.us/ahs/mathematics/ryan.mayers/default.aspx

1
You can overwrite standard MoveToDate function and add your custom script call leaving all other functionality the same.Yevgeniy.Chernobrivets

1 Answers

0
votes

Figured it out - added

if (SP.UI.ApplicationPages.CalendarNotify.$4a) {
                    var OldCalendarNotify = SP.UI.ApplicationPages.CalendarNotify.$4a;
                    SP.UI.ApplicationPages.CalendarNotify.$4a = function (){
                        doModifyCalendar();
                        doModifyCal();
                    }

SP.UI.ApplicationPages.CalendarNotify.$4a is only triggered when the calendar resets - so this made it run the tooltip function anytime it got reloaded.