I built this for https://app.masterleague.nz, a small pickleball league site of mine, and figured it might be useful to others: AddToCalendar generates Google Calendar / Outlook.com links and downloadable .ics files from plain Date/Time structs, entirely server-side — no JS dependency, no timezone database needed.
When I went looking for something like this, everything I could find were paid or sponsored javascript libraries, so I wrote a small Elixir version.
It ships a AddToCalendar.Component.calendar_button/1 Phoenix component (a <details>/<summary> dropdown, no JS) if you want a drop-in UI, or you can use the plain functions (google_url/1, outlook_url/1, ics_content/1, ics_data_uri/1) directly if you want to build your own.
- Hex: add_to_calendar | Hex
- Docs: add_to_calendar v0.1.0 — Documentation
- Source:
This is a first release (0.1.0) and I’m sure there are edge cases and platforms I haven’t hit yet — bug reports and MRs are very welcome, on GitLab or here. Happy to hear if this is useful to anyone else.






















