New to Telerik UI for .NET MAUI? Start a free 30-day trial
Date Ranges in .NET MAUI DatePicker
The DatePicker allows you to define a date range and choose a date within that range.
To implement date ranges, use the following DatePicker properties:
-
MinimumDate
(DateTime
)—Defines a date, which marks the beginning of the range of the available dates. The default value isDateTime(2000,1,1)
. -
MaximumDate
(DateTime
)—Defines a date, which marks the end of the range of the available dates to choose from. The default value isDateTime(2099, 12, 31, 23, 59, 59)
.
The following example demonstrates how to set date ranges in the DatePicker.
1. Define the control and the date ranges.
XAML
<telerik:RadDatePicker MinimumDate="2020,1,1"
MaximumDate="2020,12,31"
DisplayStringFormat="yyy-ddd-MMM"/>
2. Add the following namespace:
XAML
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"