# Disabled Dates

The MultiViewCalendar allows you to disable certain days which are not intended to be selected by the end user such as weekends, national holidays, and others.

To disable a date, either [set an array](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/scheduling/multiviewcalendar/disable-dates#setting-an-array) or [add a function](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/scheduling/multiviewcalendar/disable-dates#adding-a-function).

## Setting an Array

When you set an array, list the days that need to be disabled by using the first letters from their names in English.

```Razor HtmlHelper
    @(Html.Kendo().MultiViewCalendar()
        .Name("MultiViewCalendar")
        .DisableDates(new[] {"we", "th" })
    )
```

```Razor TagHelper
    <kendo-multiviewcalendar name="MultiViewCalendar" 
        disable-dates="new DateTime[] { DateTime.Now }">
    </kendo-multiviewcalendar>
```

## Adding a Function

When you add a function, determine its return value as `true` for the date that is disabled.

```Razor HtmlHelper
    @(Html.Kendo().MultiViewCalendar()
        .Name("MultiViewCalendar")
        .DisableDates("handler")
    )
```

```Razor TagHelper
    <kendo-multiviewcalendar value="DateTime.Now" name="dateTimePicker" disable-dates-handler="handler">
    </kendo-multiviewcalendar>
```

```JavaScript
    <script>
        function handler(date) {
            var disabled = [13,14,20,21];
            if (date && disabled.indexOf(date.getDate()) > -1 ) {
                return true;
            } else {
                return false;
            }
        }
    </script>
```

## See Also

* [Disabled Dates in the MultiViewCalendar HtmlHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/multiviewcalendar/disabled-dates)
* [Server-Side API](https://www.telerik.com/aspnet-core-ui/documentation/api/multiviewcalendar)
