Device calendar access for Ionic 6 / Capacitor 5?

I see this post from a couple of years ago with no answer: Add to device calendar using Ionic React 5

I see that the official “enterprise” Calendar plugin is end-of-life: Cordova and Capacitor Calendar Plugin | Ionic

So far I don’t see anything else pointing me to an up-to-date, Capacitor-based device calendar plugin that can be used to add appointments to the device calendar.

Perhaps the answer is: A plugin isn’t needed for this any longer - just do (whatever). If that’s the case, a hint as to “whatever” is would be super helpful.

If a plugin really is needed or is really the “right way” to do it in an Ionic app, am I out of luck b/c there are no up-to-date, Capacitor-based plugins?


I don’t know about calendar plugins, but for what you want to do, the best way is to create a capacitor plugin that communicate with the respective OS (for example Eventkit for iOS)

Another thing you can do is use a ics/vcs library made for the web/js that does this for you. Basically create an event and then download it to the device via API.

These are example of ics for JavaScript libraries:

GitHub - nwcell/ics.js: A browser firendly VCS file generator written entirely in javascript!!!!!!, but I don’t think it is supported anymore. You can try using it and fork it and fix any issue you find yourself.

GitHub - adamgibbons/ics: iCalendar (ics) file generator for node.js looks to be supported

Thanks for the reply. Some follow-up:

Writing my own capacitor plugin sort of defeats the purpose of a cross-platform solution. Given that Ionic/Capacitor has at one time had a calendar plugin (as I linked in my original post), it’s at best disappointing and at worst very curious that they no longer have one.

In terms of using an ics library - thanks for the pointers. At the risk of revealing my ignorance, I don’t know how to interpret “then download it to the device via API.” Sounds like more platform-specific work would be required for that approach. Is that what you’re suggesting? Do you know what specific APIs are involved?

Thanks again.