.NET MAUI DateTimePicker Default Dates
You can define preselected dates both in the DateTimePicker (the selected date) and in the spinner (the highlighted date).
Defining the Current Date Selection
Through the Date
property of the DateTime?
type you can define the current date selection. The default value is null
.
<telerik:RadDateTimePicker Date="2020,05,15"
SpinnerFormat="yyy-MMM"/>
Add the following namespace:
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
Setting the Highlighted Date
The DefaultHighlightedDate
property of type DateTime
defines the System.DateTime
, which will be used to pre-scroll each spinner when the Date
property is set to null
.
<telerik:RadDateTimePicker Date="{x:Null}"
DefaultHighlightedDate="2020,05,15"
SpinnerFormat="dd/MMM/yyyy"/>
Add the following namespace:
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"