# Blazor Calendar Overview

The <a href="https://www.telerik.com/blazor-ui/calendar" target="_blank">Blazor Calendar component</a> allows the user to scroll through a Gregorian calendar and select one or more dates. You can control to what level the user can zoom the calendar (for example, up to months or years), what are the minimum and maximum date the user can navigate to, and whether they can select one or more dates.

## Creating Blazor Calendar

1. Use the `TelerikCalendar` tag to add the component to a razor page.

2. Configure the minimum and maximum allowed dates by setting the `Min` and `Max` parameters.

3. Handle the `ValueChanged` event.

4. Set the value binding.

> caption Basic Calendar with its key features and ValueChanged event handling

<demo metaUrl="client/calendar/overview/" height="500"></demo>

## Navigation

The Blazor Calendar navigation allows the user to navigate through several views that represent different periods of time, for example, a month or a year. You can control the calendar level (view) at which the user starts, to what detail (view) they can go, the min, max, and current date. To make the Calendar display a specific date programmatically, you can use the `Date` and `View` parameters that support two-way binding. [Read more about the Calendar navigation...](https://www.telerik.com/blazor-ui/documentation/components/calendar/navigation)

## Selection

The Calendar allows you to configure every aspect of the date selection. You can control whether the user can select only one or more dates. You can create a collection of disabled dates so that the user cannot select from them or define selectable ranges of days. [Read more about the Calendar selection...](https://www.telerik.com/blazor-ui/documentation/components/calendar/selection)

## Templates

The Blazor Calendar provides different types of templates to customize the component's content and styling. These include [month cell, year cell, decade cell, century cell and header templates](https://www.telerik.com/blazor-ui/documentation/components/calendar/templates/overview).

## Multiple Views

You can display a wider range of dates by rendering multiple instances of the Calendar so that the users can find the desired date easier. [Read more about the multiple views in the Calendar...](https://www.telerik.com/blazor-ui/documentation/components/calendar/multiview)

## Events

The Blazor Calendar generates events that you can handle and further customize ist behavior. [Read more about the Blazor Calendar events...](https://www.telerik.com/blazor-ui/documentation/components/calendar/events).

## Calendar Parameters

The Blazor Calendar provides various parameters that allow you to configure the component. Also check the [Calendar's public API](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.telerikcalendar).

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

| Attribute            | Type and Default Value                           | Description                                                                                                                                                                                                                                                                                                                                              |
| -------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `AllowReverse`       | `bool`                                           | When [range selection](https://www.telerik.com/blazor-ui/documentation/components/calendar/selection#range-selection-mode) is enabled, defines if the range is valid when the selected end date is a date before the start date.                                                                                                                         |
| `BottomView`         | `CalendarView` enum <br /> (`Month`)             | The most detailed view of the Calendar to which the user can navigate to.                                                                                                                                                                                                                                                                                |
| `Date`               | `DateTime`                                       | The date that indicates the view the user is currently in. Supports two-way binding.                                                                                                                                                                                                                                                                     |
| `DisabledDates`      | `List<DateTime>`                                 | A list of dates that cannot be selected as the start or end of the range. See the <a href="https://demos.telerik.com/blazor-ui/calendar/disabled-dates" target="_blank">Live Demo: Calendar - Disabled Dates</a>.                                                                                                                                        |
| `Max`                | `DateTime`                                       | The latest date that the user can select.                                                                                                                                                                                                                                                                                                                |
| `Min`                | `DateTime`                                       | The earliest date that the user can select.                                                                                                                                                                                                                                                                                                              |
| `Orientation`        | `CalendarOrientation` enum <br /> (`Horizontal`) | The orientation of the Calendar. The available options are `Horizontal` and `Vertical`. Applicable when using [more than one view](https://www.telerik.com/blazor-ui/documentation/components/calendar/multiview).                                                                                                                                       |
| `RangeStart`         | `DateTime`                                       | The selected start date when [range selection](https://www.telerik.com/blazor-ui/documentation/components/calendar/selection#range-selection-mode) is enabled. Supports two-way binding.                                                                                                                                                                 |
| `RangeEnd`           | `DateTime`                                       | The selected end date when [range selection](https://www.telerik.com/blazor-ui/documentation/components/calendar/selection#range-selection-mode) is enabled. Supports two-way binding.                                                                                                                                                                   |
| `SelectedDates`      | `List<DateTime>`                                 | The selected dates when [multiple selection](https://www.telerik.com/blazor-ui/documentation/components/calendar/selection#multiple-selection-mode) is used.                                                                                                                                                                                             |
| `SelectionMode`      | `CalendarSelectionMode` enum <br /> (`Single`)   | The [selection mode](https://www.telerik.com/blazor-ui/documentation/components/calendar/selection) of the calendar.                                                                                                                                                                                                                                     |
| `ShowWeekNumbers`    | `bool`                                           | Sets if the Calendar will display week numbers according to the [ISO-8601 format](https://learn.microsoft.com/en-us/dotnet/api/system.globalization.isoweek.getweekofyear). Note that the [ISO week number may differ from the conventional .NET week number](https://learn.microsoft.com/en-us/dotnet/api/system.globalization.calendar.getweekofyear). |
| `ShowOtherMonthDays` | `bool` <br /> (`true`)                           | Defines whether the leading and trailing days from other months are visible in the current month view.                                                                                                                                                                                                                                                   |
| `TopView`            | `CalendarView` enum <br /> (`Century`)           | The most aggregated view of the Calendar to which the user can navigate.                                                                                                                                                                                                                                                                                 |
| `Value`              | `DateTime` or `DateTime?`                        | The current value of the component when [single selection](https://www.telerik.com/blazor-ui/documentation/components/calendar/selection#single-selection-mode) is used. Supports two-way binding.                                                                                                                                                       |
| `View`               | ` CalendarView` enum <br /> (`Month`)            | The current view that will be displayed in the Calendar. Supports two-way binding.                                                                                                                                                                                                                                                                       |
| `Views`              | ` int` <br/> (`1`)                               | The [number of views](https://www.telerik.com/blazor-ui/documentation/components/calendar/multiview) that will be rendered to each other.                                                                                                                                                                                                                |

### Styling and Appearance

The following parameters enable you to customize the appearance of the Blazor Calendar:

| Attribute | Type and Default Value | Description                                                                                                   |
| --------- | ---------------------- | ------------------------------------------------------------------------------------------------------------- |
| `Class`   | `string`               | The CSS class that will be rendered on the main wrapping element of the Calendar (`<div class="k-calendar>`). |

## Calendar Reference and Methods

Add a reference to the component instance to use the [Blazor Calendar methods](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.telerikcalendar).

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

| Method       | Description                                                                                           |
| ------------ | ----------------------------------------------------------------------------------------------------- |
| `NavigateTo` | Navigates to a specified date and view. The method expects a `DateTime` and `CalendarView` arguments. |
| `Refresh`    | Re-renders the Calendar.                                                                              |

<demo metaUrl="client/calendar/overview/methods/" height="500"></demo>

## Next Steps

* [Configuring the Date Selection](https://www.telerik.com/blazor-ui/documentation/components/calendar/selection)

* [Using the Calendar Events](https://www.telerik.com/blazor-ui/documentation/components/calendar/events)

## See Also

* [Navigation](https://www.telerik.com/blazor-ui/documentation/components/calendar/navigation)
* [Selection](https://www.telerik.com/blazor-ui/documentation/components/calendar/selection)
* [Multiple Views](https://www.telerik.com/blazor-ui/documentation/components/calendar/multiview)
* [Live Demo: Calendar](https://demos.telerik.com/blazor-ui/calendar/overview)
* [Calendar API Reference](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.telerikcalendar)
