Pure Hiccup UI components for calendar views.
All functions are pure — they receive data and return Hiccup structures. No side effects, no I/O, no HTMX-specific markup. Composable into any Ring handler or Hiccup template.
Components: event-badge — colored pill with title and time day-cell — single day grid cell with event badges month-view — full month calendar grid week-view — 7-column week grid with hourly rows mini-calendar — compact month navigator for sidebars
Pure Hiccup UI components for calendar views. All functions are pure — they receive data and return Hiccup structures. No side effects, no I/O, no HTMX-specific markup. Composable into any Ring handler or Hiccup template. Components: event-badge — colored pill with title and time day-cell — single day grid cell with event badges month-view — full month calendar grid week-view — 7-column week grid with hourly rows mini-calendar — compact month navigator for sidebars
(day-cell date events)(day-cell date events opts)Render a single day cell in a calendar grid.
Args: date - java.time.LocalDate events - seq of EventData maps (already filtered to this day) opts - map with optional keys: :today LocalDate — if date equals today, adds .today CSS class :selected-date LocalDate — if date equals selected, adds .selected CSS class :timezone string — for event time display (default UTC)
Returns: Hiccup [:div.day-cell ...] element
Render a single day cell in a calendar grid.
Args:
date - java.time.LocalDate
events - seq of EventData maps (already filtered to this day)
opts - map with optional keys:
:today LocalDate — if date equals today, adds .today CSS class
:selected-date LocalDate — if date equals selected, adds .selected CSS class
:timezone string — for event time display (default UTC)
Returns:
Hiccup [:div.day-cell ...] element(event-badge event)(event-badge event timezone)Render a single event as a colored pill showing title and start time.
Args: event - EventData map timezone - string timezone for local-time display (default UTC)
Returns: Hiccup [:div.event-badge ...] element
Render a single event as a colored pill showing title and start time. Args: event - EventData map timezone - string timezone for local-time display (default UTC) Returns: Hiccup [:div.event-badge ...] element
(mini-calendar year month selected-date)(mini-calendar year month selected-date opts)Render a compact month navigator suitable for sidebars.
Renders day numbers only (no event badges). Highlights today and selected date. Prev/next navigation links use query-param convention: ?year=Y&month=M.
Args: year - integer month - integer 1–12 selected-date - java.time.LocalDate or nil opts - map with optional keys: :today LocalDate — highlight today
Returns: Hiccup [:div.mini-calendar ...] element
Render a compact month navigator suitable for sidebars.
Renders day numbers only (no event badges). Highlights today and selected date.
Prev/next navigation links use query-param convention: ?year=Y&month=M.
Args:
year - integer
month - integer 1–12
selected-date - java.time.LocalDate or nil
opts - map with optional keys:
:today LocalDate — highlight today
Returns:
Hiccup [:div.mini-calendar ...] element(month-view year month events)(month-view year month events opts)Render a full month calendar grid.
Renders a 7-column grid (Mon–Sun) with rows for each week. Days from the previous and next months are rendered as empty filler cells.
Args: year - integer (e.g. 2026) month - integer 1–12 events - seq of EventData maps (filtered to this month by the caller, or pass all) opts - map with optional keys: :today LocalDate — highlight today :selected-date LocalDate — highlight selected date :timezone string — for event time display (default UTC)
Returns: Hiccup [:div.calendar-month ...] element
Render a full month calendar grid.
Renders a 7-column grid (Mon–Sun) with rows for each week.
Days from the previous and next months are rendered as empty filler cells.
Args:
year - integer (e.g. 2026)
month - integer 1–12
events - seq of EventData maps (filtered to this month by the caller, or pass all)
opts - map with optional keys:
:today LocalDate — highlight today
:selected-date LocalDate — highlight selected date
:timezone string — for event time display (default UTC)
Returns:
Hiccup [:div.calendar-month ...] element(week-view start-date events)(week-view start-date events opts)Render a 7-column week grid with hourly time rows (00:00–23:00).
Args: start-date - java.time.LocalDate (Monday of the week to display) events - seq of EventData maps opts - map with optional keys: :today LocalDate — highlight today's column :timezone string — for event time display (default UTC)
Returns: Hiccup [:div.calendar-week ...] element
Render a 7-column week grid with hourly time rows (00:00–23:00).
Args:
start-date - java.time.LocalDate (Monday of the week to display)
events - seq of EventData maps
opts - map with optional keys:
:today LocalDate — highlight today's column
:timezone string — for event time display (default UTC)
Returns:
Hiccup [:div.calendar-week ...] elementcljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |