Command breaks
<mct:EventToCommandBehavior
Command="{Binding ConfirmDateCommand, Source={x:RelativeSource AncestorType={x:Type vm:TurbinesCollectionPageViewModel}}}"
CommandParameter="{Binding Source={x:Reference picker}, Path=SelectedDate}"
EventName="OkButtonClicked" />
System.InvalidOperationException: 'Operation is not valid due to the current state of the object.'
StackTrace = " at Microsoft.Maui.Controls.Binding.<ApplyRelativeSourceBinding>d__27.MoveNext()\r\n at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)\r\n at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()", Source = "Microsoft.Maui.Controls", Message = "Operation is not valid due to the current state of the object.", InnerException = null, HelpLink = null, HResult = -2146233079, Data = {System.Collections.ListDictionaryInternal}
[RelayCommand]
void ConfirmDate(DateTime dateTime) {
if (DateTimePicker != null) {
currentCulture = new CultureInfo(deviceLanguageService.GetDeviceLanguage());
Turbine!.InstalationDateTime = dateTime;
DateTimePicker.IsOpen = false;
Turbine.StringifyInstalationDate = Turbine.InstalationDateTime?.ToString("D", currentCulture)!;
}
}