0

I was given a task to add a calendar on the intranet site that I am currently branding.

The calendar is supposed to show the schedule of various certifications courses with nice looking. I have used calendar overlay, added some CSS on a separate content editor, and the calendar look is some what improved. They are also interested in making a quick search on the calendar by event.

Did any one have worked on calendar customization?

0

Sample script to overwrite OOB calendar function to do customization(filter for this case).

<script type="text/javascript">
        function searchCalendar() {
            window.location = window.location;
        }
        ExecuteOrDelayUntilScriptLoaded(CustomizeCalendarEvents, "SP.UI.ApplicationPages.Calendar.js");
        function CustomizeCalendarEvents() {            
            var _onItemsSucceed = SP.UI.ApplicationPages.CalendarStateHandler.prototype.onItemsSucceed;            
            SP.UI.ApplicationPages.CalendarStateHandler.prototype.onItemsSucceed = function ($p0, $p1) {
                if (this.$K_1.$8G_0()) {
                    this.$28_1();
                    return;
                }
                this.$41_1 = false;
                if (this.$3G_1) {
                    this.$D_1.$4T_1();
                    this.$3G_1 = false;
                }
                if (SP.UI.ApplicationPages.SU.$2(this.$39_1[this.$j_1])) {
                    this.$39_1[this.$j_1] = [];
                }
                Array.addRange(this.$39_1[this.$j_1], $p0);
                this.$D_1.$7S_1(this.$j_1, this.$v_1, $p1, this.$39_1[this.$j_1]);
                this.$j_1++;
                this.$1h_1();
                alert('callback');
                //to do filter logic 
            }
        }
    </script>
    <input id="Button1" onclick="searchCalendar()" type="button" value="button" />

Get event properties for filter, you may check below thread. https://social.msdn.microsoft.com/Forums/office/en-US/6ead033b-4f9c-48a6-9a6d-a395fdb424b9/share-point-2010-calendar?forum=sharepointdevelopmentprevious

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.