PhoenixLiveCalendar.Views.WeekGrid (PhoenixLiveCalendar v0.1.0)

Copy Markdown View Source

Week time grid view — 7 day columns with a vertical time axis.

Also used as the base for day view (1 column) and N-day view (N columns).

Summary

Functions

Renders a week/day/N-day time grid.

Functions

week_grid(assigns)

Renders a week/day/N-day time grid.

Attributes

  • dates — List of dates to display as columns
  • events — List of PhoenixLiveCalendar.Event structs
  • selected_date — Currently selected date
  • today — Today's date
  • min_time — Earliest visible time (default: ~T[00:00:00])
  • max_time — Latest visible time (default: ~T[23:59:59])
  • slot_duration — Slot duration in minutes (default: 30)
  • slot_height — CSS height per slot (default: "3rem")
  • show_now_indicator — Show current time line (default: true)
  • show_all_day_row — Show all-day event row (default: true)
  • business_hours — List of PhoenixLiveCalendar.Availability for highlighting
  • on_date_click — Handler for date header clicks
  • on_time_click — Handler for time slot clicks
  • on_event_click — Handler for event clicks
  • translations — Translation overrides
  • time_format:h24 or :h12 (default: :h24)
  • class — Additional CSS classes
  • dir — Text direction (default: :ltr)

Slots

  • event — Custom event rendering
  • time_label — Custom time gutter label

Attributes

  • dates (:list) (required)
  • events (:list) - Defaults to [].
  • selected_date (Date) - Defaults to nil.
  • today (Date) - Defaults to nil.
  • min_time (Time) - Defaults to ~T[00:00:00].
  • max_time (Time) - Defaults to ~T[23:59:59].
  • slot_duration (:integer) - Defaults to 30.
  • slot_height (:string) - Defaults to "3rem".
  • show_now_indicator (:boolean) - Defaults to true.
  • show_all_day_row (:boolean) - Defaults to true.
  • business_hours (:list) - Defaults to [].
  • on_date_click (:any) - Defaults to nil.
  • on_time_click (:any) - Defaults to nil.
  • on_event_click (:any) - Defaults to nil.
  • translations (:map) - Defaults to %{}.
  • time_format (:atom) - Defaults to :h24.
  • class (:string) - Defaults to "".
  • dir (:atom) - Defaults to :ltr.

Slots

  • event
  • time_label