I have a Calendar View web part that I've placed in a SharePoint page. When I create an item to SharePoint calendar list. Item is shown as an hyperlink.
Any idea how to hide/remove it?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityYou can override the onsuccess handler of the calendar.
SP.UI.ApplicationPages.CalendarStateHandler.prototype.onItemsSucceed
Add something like below to the success handler
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', '#');
});
});
}
See a similar example here: https://mhusseini.wordpress.com/2012/05/18/handle-clicks-on-calendar-items-in-sharepoint-2010-with-javascript/
The article is for SP 2010 but the concept should be similar for 2013.