See the main issue here to get the Okay and Cancel events in the
datepicker dialog.
The DatePicker in maui has the OK
and Cancel
button.
You can trigger event DateSelected
once clicking button OK
in the datepicker dialog.
<DatePicker MinimumDate="01/01/2022"
MaximumDate="12/31/2022"
Date="06/21/2022"
DateSelected="DatePicker_DateSelected"
/>
method DatePicker_DateSelected
:
private void DatePicker_DateSelected(object sender, DateChangedEventArgs e)
{
System.Diagnostics.Debug.WriteLine("the selected date is: " + e.NewDate);
}