如何在SharePoint中的SharePoint日历控件中禁用特定日期

问题描述

我在使用SharePoint日历控件的地方有一个Visual WebPart。我需要禁用用户无法选择的日历中的特定日期。我尝试了很多方法,但是没有运气。谁能帮我。

我有一个要在日历中禁用的数组中的日期列表。

20/08/2020

21/08/2020

22/08/2020

23/08/2020

24/08/2020

解决方法

SharePoint日历控件未提供实现这一目标的OOB方法。

DateTimeControl属性供您参考:

https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ms415699(v=office.14)

您可以尝试使用JQuery DatePicker插件来满足您的要求。

演示:Jquery UI datepicker. Disable array of Dates

类似的问题: https://social.msdn.microsoft.com/Forums/office/en-US/1194e097-12c9-42a7-9ece-ff40fd81129a/sharepoint-calender-date-disable?forum=sharepointdevelopmentprevious