Phoenix components for EventCalendar.
The HEEx components live in LiveCalendar.Components. This module provides helpers
to drive a LiveView calendar from the server.
Summary
Functions
Returns the version of EventCalendar bundled with this library.
Runs a calendar method on the client from a LiveView.
Functions
@spec event_calendar_version() :: String.t()
Returns the version of EventCalendar bundled with this library.
iex> CalendarComponent.event_calendar_version()
"5.17.2"
@spec push_command(Phoenix.LiveView.Socket.t(), String.t(), atom(), list()) :: Phoenix.LiveView.Socket.t()
Runs a calendar method on the client from a LiveView.
calendar_id is the id given to LiveCalendar.Components.calendar/1.
Supported commands:
:goto_date-[date], aDate,DateTimeor ISO8601 string:next,:prev,:today:refetch_events,:refetch_resources- reloadeventSources/resourcesgiven as URLs:unselect- clears the current selection:set_option-[name, value], sets any EventCalendar option
Examples
socket
|> CalendarComponent.push_command("calendar", :goto_date, [~D[2026-12-01]])
|> CalendarComponent.push_command("calendar", :set_option, ["view", "timeGridWeek"])