# .NET MAUI Calendar Commands

The <a href="https://www.telerik.com/maui-ui/calendar" target="_blank">.NET MAUI Calendar</a> provides various commands that allow the user to switch between the display modes and views.

## Commands for Navigating the Current View

The following commands enable the navigation between same level views:

* `NavigateToNextViewCommand`(`ICommand`)—Gets the command that is executed when the user navigates to the next view.
* `NavigateToPreviousViewCommand`(`ICommand`)—Gets the command that is executed when the user navigates to the previous view.

## Commands for Navigating between Views

The following commands enable the navigation between the view levels:

* `NavigateToUpperViewCommand`(`ICommand`)—Gets the command that is executed when the user navigates to the upper view.
* `NavigateToLowerViewCommand`(`ICommand`)—Gets the command that is executed when the user navigates to the lower view.

When switching between view levels, the Calendar implements the following navigation sequence:

* When navigating to the upper view: Month > Year > Decade > Century.
* When navigating to the lower view: Century > Decade > Year > Month.

## Navigation Example

**1.** Define the Calendar:

```XAML
<telerik:RadCalendar x:Name="calendar" Grid.Row="1" />
```

**2.** Execute the `NavigateToNextViewCommand` and `NavigateToPreviousViewCommand` on button click:

```XAML
<Button Text="Navigate to previous" Command="{Binding NavigateToPreviousViewCommand,Source={x:Reference calendar}}"/>
<Button Text="Navigate to next" Command="{Binding NavigateToNextViewCommand,Source={x:Reference calendar}}"/>
```

**3.** Execute the `NavigateToUpperViewCommand` and `NavigateToLowerViewCommand` on button click:

```XAML
<Button Text="Navigate to lower view" Command="{Binding NavigateToLowerViewCommand, Source={x:Reference calendar}}"/>
<Button Text="Navigate to upper view" Command="{Binding NavigateToUpperViewCommand, Source={x:Reference calendar}}"/>
```

![Telerik UI for .NET MAUI Calendar command buttons navigating between months and different views](https://www.telerik.com/maui-ui/documentation/assets/496c54152cca8317b662b0314b12f914/calendar-commands.gif)

> For a runnable example demonstrating the Calendar Commands, see the [SDKBrowser Demo Application](https://www.telerik.com/maui-ui/documentation/demos-and-sample-apps/sdkbrowser-app) and go to the **Calendar > Commands** category.

## See Also

* [Navigation Between the Different Views](https://www.telerik.com/maui-ui/documentation/controls/calendar/navigation)
* [Specify the Formatting](https://www.telerik.com/maui-ui/documentation/controls/calendar/formatting)
* [Selection modes](https://www.telerik.com/maui-ui/documentation/controls/calendar/selection)
* [Use exposed Events](https://www.telerik.com/maui-ui/documentation/controls/calendar/events)
* [Define Templates](https://www.telerik.com/maui-ui/documentation/controls/calendar/templates)
