New to Telerik UI for .NET MAUI? Start a free 30-day trial

.NET MAUI DatePicker Default Dates

You can define preselected dates both in the DatePicker (the selected date) and in the spinner (the highlighted date).

Defining the Current Date Selection

To define the current date selection:

1. Set the Date property of the DateTime? type. The default value is null.

<telerik:RadDatePicker Date="2020,05,15"
                            SpinnerFormat="yyy-MMM"/>

2. Add the following namespace:

xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"

Setting the Highlighted Date

To set the highlighted date:

1. Set the DefaultHighlightedDate property of type DateTime to define the System.DateTime, which will be used to pre-scroll each spinner when the Date property is null.

<telerik:RadDateTimePicker Date="{x:Null}"
                                DefaultHighlightedDate="2020,05,15"
                                SpinnerFormat="dd/MMM/yyyy"/>

2. Add the following namespace:

xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"

See Also

In this article