Search code examples
sharepointcalendarcustomizationweb-parts

Sharepoint Calendar webpart config only whole day events


Is there a way to config the sharepoint event-form-webpart in a sp teamsite to use only - whole day events - only with field category as descritpion - hide fields location and description

I want to use it as a absence-planner.

I only found the way to choose own categories in the listsettings of the calendar. whole-day-event-column is not being showed in listsettings! How can this be done in sharepoint-designer?


Solution

  • If this is a modern site...it's not possible to edit the modern webparts with Sharepoint Designer or from inside the Sharepoint UI, currently. You might be able to do it with the Office 365 CLI and Powershell: https://pnp.github.io/office365-cli/

    --

    You can however, do this with a classic events list. From inside the list settings, you can go to "Advanced Settings" and make sure you have management of content types set to "Yes".

    Then, on the list settings page under the content types header, click on "Events" and you will see a list of the columns. You can click on the column and hide it, and it will no longer show when you add a new event from the classic calendar view.

    This doesn't work for the all day event part of your question but you can also edit the form using jquery: https://hpatel.wordpress.com/2014/06/05/sharepoint-2013-how-to-hide-all-day-event-recurrence-and-category-fields-from-calendar-new-item-form/

    You could check the checkbox with something like: $('input:checkbox').prop('checked', true); and hide the time fields.

    --

    If I was doing this I'd give the user a form (http://forms.microsoft.com) and then tie it to my Sharepoint calendar through Power Automate (Flow). You could even work an approval process into it so that you could approve their request to add it to the calendar or reject it and send them an email.