0

I have a Visual WebPart where I am using SharePoint calendar control. I have a requirement to disable specific date in calendar which user can't select. I have tried many ways but no luck. Can anyone help me please.

<SharePoint:DateTimeControl ID="dtDateTimeControl" runat="server" DateOnly="true" />

I have list of dates in a array which I want to disable in the calendar .

20/08/2020

21/08/2020

22/08/2020

23/08/2020

24/08/2020

1 Answers1

1

SharePoint calendar control does not provide a OOB way to achieve this.

DateTimeControl Properties for your reference:

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

You could try to use JQuery DatePicker plugin to achieve your requirement.

Demo:Jquery UI datepicker. Disable array of Dates

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

Amos
  • 2,030
  • 1
  • 5
  • 9