Skip to content

Spanning all day events can't be saved properly in iOS #451

@SuperKrallan

Description

@SuperKrallan

Saving an event with allDay = true and where end date are some days after start date works fine for android, but the same flutter code run on iOS results in change in the end date to the same as the start date.

in the file SwiftDeviceCalendarPlugin.swift line 818-820 you see this:

if (isAllDay) { ekEvent!.endDate = startDate }
else {
ekEvent!.endDate = endDate_

...and that if statement makes very little sense to me. If I remove the first part it works as it should...

To Reproduce
Save any "all day" event spanning more than one day will result in this error in iOS, but not on Android.

Expected behavior
Same as on android and in all other calendar apps I have seen, that the all day event is present on all days in the time span.

Device(s) tested

  • Device: iPhone SE (1st gen), iPhone 14 Emulator
  • OS: iOS 15.7
  • 4.2.0 Release

Flutter doctor
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 3.4.0-34.1.pre, on macOS 12.6 21G115 darwin-arm64, locale sv-SE)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] Connected device (4 available)
[✓] HTTP Host Availability

• No issues found!

Additional context
Thanks for a great plug in!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions