protected virtual void SyncViewModelWithView(CalendarDay selectedDay) { foreach (CalendarDay day in Days) { if (day == null) { continue; } bool isSelected = day == selectedDay ? true : false; if (isSelected) { SelectedDate = day.LocalDate.ToDateTimeUnspecified(); } } if (AutoClose == true) { PopupNavigation.Instance.PopAsync(); } }
protected virtual void SyncViewModelWithView(CalendarDay selectedDay) { foreach (CalendarDay day in Days) { if (day == null) { continue; } bool isSelected = day == selectedDay ? true : false; if (isSelected) { DateTime newSelectedDateTime = day.LocalDate.ToDateTimeUnspecified(); SelectedDateTime = new DateTime(newSelectedDateTime.Year, newSelectedDateTime.Month, newSelectedDateTime.Day, SelectedDateTime?.Hour ?? 0, SelectedDateTime?.Minute ?? 0, SelectedDateTime?.Second ?? 0); } } if (AutoClose == true) { Navigation.PopPopupAsync(); } }