Hide All Day Event and Recurrence field from calendar in SharePoint 2013/2016


This SharePoint 2013 tutorial explains, how to hide “All Day Event” and “Recurrence” fields in SharePoint 2013/2016 calendar. Using script editor web part we can hide All Day event and Recurrence fields in SharePoint 2013/2016 site.


New to Office 365 SharePoint Online? Get Office 365 Enterprise E3 Subscription & Try out all the features

Hide all day event field SharePoint 2013

Follow below steps hide all day event field SharePoint 2013 or SharePoint 2016.

1. Open your Calendar in SharePoint 2013/2016.

2. Navigate to Calendar tab -> expand from webpart -> and click on Default New form.

3. Now your new form will show in edit mode.

4. Click on Add web part to add a content editor web part or a script editor web part in SharePoint 2013/2016.

5. Now from ribbon click on edit source and paste the following code.

<script type=”text/javascript”>

_spBodyOnLoadFunctionNames.push(“hideall()”);
function hideall()
{
HideField(“Recurrence”);
HideField(“All Day Event”);
}

function HideField(title){
var header_h3=document.getElementsByTagName(“h3″) ;

for(var i = 0; i <header_h3.length; i++)
{
var el = header_h3[i];
var foundField ;
if(el.className==”ms-standardheader”)
{
for(var j=0; j<el.childNodes.length; j++)
{
if(el.childNodes[j].innerHTML == title || el.childNodes[j].nodeValue == title)
{
var elRow = el.parentNode.parentNode ;
elRow.style.display = “none”; //and hide the row
foundField = true ;
break;
}
}
}
if(foundField)
break ;
}
}
</script>


6. Now the desired field will be hidden.

You may like following SharePoint Calendar tutorials:

Hope it will be helpful to you hide all day event field SharePoint 2013/2016.

Check out Best Alternative to InfoPath -> Try Now

FREE SHAREPOINT 2019 PDF

(Installation & Features)