expo-calendar
Version: 55.0.6
Provides an API for interacting with the device’s system calendars, events, reminders, and associated records.
Installation
npx expo install expo-calendar
Usage
import * as Calendar from 'expo-calendar';
// Request permissions
const { status } = await Calendar.requestCalendarPermissionsAsync();
if (status === 'granted') {
// Get calendars
const calendars = await Calendar.getCalendarsAsync(
Calendar.EntityTypes.EVENT
);
console.log('Calendars:', calendars);
// Create event
const calendarId = calendars[0].id;
const eventId = await Calendar.createEventAsync(calendarId, {
title: 'Meeting',
startDate: new Date(),
endDate: new Date(Date.now() + 3600000),
location: 'Office',
});
}
API Reference
Permissions
requestCalendarPermissionsAsync()
() => Promise<PermissionResponse>
Requests calendar permissions
requestRemindersPermissionsAsync()
() => Promise<PermissionResponse>
Requests reminders permissions
Calendars
getCalendarsAsync(entityType)
(entityType?: EntityType) => Promise<Calendar[]>
Gets calendarsconst calendars = await Calendar.getCalendarsAsync(
Calendar.EntityTypes.EVENT
);
createCalendarAsync(details)
(details: CalendarDetails) => Promise<string>
Creates calendar
deleteCalendarAsync(id)
(id: string) => Promise<void>
Deletes calendar
Events
createEventAsync(calendarId, eventData)
(calendarId: string, eventData: Event) => Promise<string>
Creates eventconst id = await Calendar.createEventAsync(calendarId, {
title: 'Team Meeting',
startDate: new Date('2026-03-01T10:00:00'),
endDate: new Date('2026-03-01T11:00:00'),
timeZone: 'America/Los_Angeles',
});
getEventAsync(id, recurringEventOptions)
(id: string, recurringEventOptions?: RecurringEventOptions) => Promise<Event>
Gets event by ID
getEventsAsync(calendarIds, startDate, endDate)
(calendarIds: string[], startDate: Date, endDate: Date) => Promise<Event[]>
Gets events in date rangeconst events = await Calendar.getEventsAsync(
[calendarId],
new Date(),
new Date(Date.now() + 86400000 * 7) // Next 7 days
);
updateEventAsync(id, details, recurringEventOptions)
(id: string, details: Event, recurringEventOptions?: RecurringEventOptions) => Promise<void>
Updates event
deleteEventAsync(id, recurringEventOptions)
(id: string, recurringEventOptions?: RecurringEventOptions) => Promise<void>
Deletes event
Examples
Create Event
import * as Calendar from 'expo-calendar';
async function createMeeting() {
const { status } = await Calendar.requestCalendarPermissionsAsync();
if (status !== 'granted') return;
const calendars = await Calendar.getCalendarsAsync();
const defaultCalendar = calendars.find(cal => cal.isPrimary);
if (defaultCalendar) {
await Calendar.createEventAsync(defaultCalendar.id, {
title: 'Team Standup',
startDate: new Date('2026-03-15T09:00:00'),
endDate: new Date('2026-03-15T09:30:00'),
location: 'Conference Room A',
notes: 'Daily standup meeting',
alarms: [{ relativeOffset: -15 }], // 15 minutes before
});
}
}
| Platform | Supported |
|---|
| iOS | ✅ |
| Android | ✅ |
| Web | ❌ |
Permissions
iOS: Add to app.json:
{
"plugins": [
[
"expo-calendar",
{
"calendarPermission": "Allow app to access your calendar."
}
]
]
}
Resources