How can I help you?
Selection in .NET MAUI Date Picker (SfDatePicker)
Set selected date to the Date Picker
The SfDatePicker control allows you to select the date using the SelectedDate property in the SfDatePicker. The default value of the SelectedDate is the current date.
<picker:SfDatePicker x:Name="picker"
SelectedDate="9/7/2023">
</picker:SfDatePicker>SfDatePicker picker = new SfDatePicker()
{
SelectedDate = new DateTime(2023, 9, 7).Date,
};
this.Content = picker;
Clear selection
The .NET MAUI DatePicker provides clear selection support, allowing you to clear the selected date by setting the SelectedDate property to null.
<picker:SfDatePicker x:Name="picker" />this.picker.SelectedDate = null;