5

Within a client-side JS application, I would like for users to be able to export an event on my site to their Apple iCalender. How do I construct that file so that they can download it?

Derek Dowling
  • 479
  • 1
  • 4
  • 15

1 Answers1

5

Apple iCalender can import .ics (RFC 5545) extension files. The best site I've seen documenting how to represent the necessary metadata within one of these files is here: https://icalendar.org/.

This post explains how to deal with creating the file and downloading it from within a JS client.

Note: You want to set a data content type of: 'text/calendar;charset=utf-8;'.

Derek Dowling
  • 479
  • 1
  • 4
  • 15