Saturday, January 23, 2021

How to remove hyperlink from SharePoint calendar web part event?

 ExecuteOrDelayUntilScriptLoaded(removeCalendarLinks, "sp.ui.applicationpages.calendar.js");


// call the below function or append to onsuccess handler

function removeCalendarLinks() {

 $(document).ready(function() {

    $('div.ms-acal-mdiv a').each(function() {

        $(this).attr('onclick', 'return false;')

        $(this).attr('href', '#');

    });

 });

}

No comments:

Post a Comment