Opens the system calendar UI prefilled with the given event, so the user can review and save it.
🚨 The returned promise resolves as soon as the calendar UI is shown, not when the user saves the event. There is no way to know whether the event was saved: Android reports a cancelled result even when the user saves, so neither platform exposes the outcome.
Rejects with calendar.unavailable when no calendar UI can be shown.
Example:
await Eitri.calendar.addEvent({
title: "Team meeting",
startDate: "2026-08-03T14:00:00.000Z",
endDate: "2026-08-03T15:00:00.000Z",
location: "Office",
notes: "Bring the quarterly report",
recurrenceRule: "FREQ=WEEKLY;COUNT=10"
})
- API LEVEL
38- Functionality added
Checks whether the device can show a calendar UI to add an event, so the eitri-app can hide the feature when it is not usable.
Returns false when no calendar app is installed on Android, and on iOS 16 and below,
where adding an event is not supported.
Example:
if (await Eitri.calendar.isAvailable()) {
// show the "add to calendar" button
}
- API LEVEL
38- Functionality added
Generated using TypeDoc
Methods for adding events to the device calendar.
These methods always show the system calendar UI prefilled with the event data, so the user reviews and confirms every event. Because of that, no calendar permission is requested and none needs to be declared by the host app.