# Selection

## Content



By default, Calendar allows you to select a day in the displayed calendar month. However, you can change this default behavior by using [SelectionMode](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.Calendar/C1.WinUI.Calendar.C1Calendar.SelectionMode.html) property of the [C1Calendar](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.Calendar/C1.WinUI.Calendar.C1Calendar.html) class that manages the date selection in the control. The **SelectionMode** property allows you to select a single date or multiple dates using the **SelectionMode** enumeration which specifies the selection behavior of the Calendar control. In addition, Calendar also allows you to limit the maximum number of days that can be selected by a user using the [MaxSelectionCount](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.Calendar/C1.WinUI.Calendar.C1Calendar.MaxSelectionCount.html) property.

The following image shows a date range selected in the calendar control.

|   ![WinUI Calendar showing date range selection](https://cdn.mescius.io/document-site-files/images/2d49eac2-0942-4770-99ef-52b14e6815bd/images/calendar-date-range-selection.gif)   |
| --- |

To allow the user to select a date range with limited number of days, use the following code. In this example, we are setting the SelectionMode property to **SelectionMode.Multiple** to allow user to select multiple dates and setting the **MaxSelectionCount** to **8** to set it as a limit for date range selection.

```csharp
<calendar:C1Calendar x:Name="calendar" SelectionMode="Multiple" MaxSelectionCount="8" HorizontalAlignment="Center" VerticalAlignment="Top"></calendar:C1Calendar>
```