roeland
AddToCalendar - server-side "add to calendar" links + ICS generation for Phoenix LiveView
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.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









