Skip to content

Commit 89af5e3

Browse files
committed
Merge branch 'feature/ios-calendarpicker-issue' into develop
2 parents 0078345 + fa82144 commit 89af5e3

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

AuroraControls.TestApp/MainPage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ await this.Navigation.PushAsync(new GridImagePage())),
234234
Content =
235235
new CalendarPicker()
236236
{
237-
UpdateMode = CalendarPickerUpdateMode.WhenDone,
237+
UpdateMode = CalendarPickerUpdateMode.Immediately,
238238
}
239239
.Assign(out _calendarPicker),
240240
},

AuroraControlsMaui/Platforms/iOS/CalendarPickerHandler.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,14 @@ private void OnDatePickerValueChanged(object sender, EventArgs e)
105105
private void DoneButtonOnClicked(object? sender, EventArgs e)
106106
{
107107
if (
108-
this.PlatformView?.InputView?.Subviews.FirstOrDefault() is not UIDatePicker datePicker ||
109-
this.VirtualView is not CalendarPicker calendarPicker ||
110-
calendarPicker.UpdateMode != CalendarPickerUpdateMode.WhenDone)
108+
this.PlatformView?.InputView?.Subviews.FirstOrDefault() is UIDatePicker datePicker &&
109+
this.VirtualView is CalendarPicker calendarPicker &&
110+
calendarPicker.UpdateMode == CalendarPickerUpdateMode.WhenDone)
111111
{
112-
return;
113-
}
112+
calendarPicker.Date = datePicker.Date.ToDateTime();
114113

115-
calendarPicker.Date = datePicker.Date.ToDateTime();
116-
117-
this.TryShowEmptyState();
114+
this.TryShowEmptyState();
115+
}
118116

119117
this.PlatformView.ResignFirstResponder();
120118
}

0 commit comments

Comments
 (0)