Try to disable dates from kendo scheduler

1 Answer 95 Views
Scheduler
Amit
Top achievements
Rank 1
Amit asked on 04 Jan 2023, 07:20 AM

Hi Team,

We have used one of your feature called Kendo Scheduler. Please find this link where we have refer the code to implement the kendo scheduler: https://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler/configuration/views.workdays.

We have one business requirement, in that user want to see only scheduled days from kendo scheduler calendar as shown below screenshot. In this example our scheduled dates range is 5th January to 12th January we want to hide or disable all dates which is not lie in this scheduled date range.

 

 

Waiting for your reply.

 

Thanks in advance..!

 

 

 

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 06 Jan 2023, 02:54 PM

Hi Amit,

I would suggest you bind a click event handler to the date rendered in the Scheduler Toolbar. Then when the Calendar is rendered you can use the setOptions method and set the needed disabled dates:

 $('.k-nav-current').click(function(){
        setTimeout(function(){
          $('.k-scheduler-calendar').data('kendoCalendar').setOptions({ disableDates: ["we", "th"]})
        })
})

Here is a Dojo example demonstrating the above.

I hope this helps. 

Regards,
Neli
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Scheduler
Asked by
Amit
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or