Skip to content

Commit

Permalink
iOs fix - allDay event does not span multiple days
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilich6107 committed Feb 20, 2022
1 parent 988f671 commit 1daf996
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/lib/presentation/pages/calendar_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class _CalendarEventPageState extends State<CalendarEventPage> {
),
// Only add the 'To' Date for non-allDay events on all
// platforms except Android (which allows multiple-day allDay events)
if (_event?.allDay == false || Platform.isAndroid)
if (_endDate != null)
Padding(
padding: const EdgeInsets.all(10.0),
child: DateTimePicker(
Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/SwiftDeviceCalendarPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ public class SwiftDeviceCalendarPlugin: NSObject, FlutterPlugin, EKEventViewDele
ekEvent!.notes = description
ekEvent!.isAllDay = isAllDay
ekEvent!.startDate = startDate
if (isAllDay) { ekEvent!.endDate = startDate }
if (isAllDay) { ekEvent!.endDate = endDate }
else {
ekEvent!.endDate = endDate

Expand Down

0 comments on commit 1daf996

Please sign in to comment.