Manage Calendar Events on a Mobile Device

A Lightning web component can use a device’s calendar functionality to create, read, update, and delete calendar events to and from the device. When these calendar-related actions occur, the event data is returned to the Lightning web component that invoked it.

Calendar events are managed locally on the mobile device, and don’t need a network connection. However, CalendarService requires access to platform-specific APIs that are available only within compatible Salesforce mobile apps.

CalendarService does not and cannot function when running in a web browser, whether on a desktop or mobile device.

Important

  • CalendarService User Experience

    Your component can deliver any user experience you like. There are a number of common calendar-based features where CalendarService might be suitable.

  • Use the CalendarService API

    To develop a Lightning web component with calendar-based features, use the CalendarService API as your method for accessing a device’s native calendar functionality.

  • CalendarService Example

    Here’s a basic example of a Lightning web component that displays calendar events and allows the user to perform basic calendar-related functions.

  • Compatibility and Requirements

    CalendarService is a JavaScript module that provides an API to Lightning web components to make mobile hardware and platform (operating system) features available in JavaScript. It requires access to device hardware and device platform APIs. This access is only available when CalendarService runs within a compatible Salesforce mobile app. **It does not and cannot function when running in a standard web browser, whether the browser runs on a desktop or mobile device. **

  • Considerations and Limitations

    Keep the following in mind when developing features that use the CalendarService API.

See Also