Disable Dates from DatePicker

1 Answer 1041 Views
Calendar DatePicker
Farid
Top achievements
Rank 1
Farid asked on 19 Dec 2021, 07:20 AM
Hello,

I have a scenario when I want to disable special weekdays from  Datepicker so the user can't choose those days.
Currently, the app is using react so is there a way to disable dates for kendo UI Datepicker

1 Answer, 1 is accepted

Sort by
1
Accepted
Kiril
Telerik team
answered on 20 Dec 2021, 06:31 AM

Hi Farid,

Each individual calendar cell can be customized, by providing custom logic inside to the `Cell` component, through the `cell` property of the Calendar. The `isDisabled` property can be passed to some cells to disable their selection and provide a visual clue of the current cell state. Please take a look at the following example:
https://www.telerik.com/kendo-react-ui/components/dateinputs/calendar/custom-rendering/#toc-overriding-the-default-properties

Once the Calendar has been customized according to your requirements, simply pass the customized calendar to the DatePicker, through the `calendar` property of the DatePicker.
For more examples of how the Calendar of the DatePicker can be configured, please refer to the following article:
https://www.telerik.com/kendo-react-ui/components/dateinputs/datepicker/custom-rendering/#toc-customizing-the-calendar

Regards,
Kiril
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Calendar DatePicker
Asked by
Farid
Top achievements
Rank 1
Answers by
Kiril
Telerik team
Share this question
or