Skip to content
Look

Shared with the landing page. Theme is the select beside this menu.

WeekView

Open .md
Live preview

Loading example…

WeekView is part of the Calendar set, imported from @jcsoftdev/ui/calendar.

import { WeekView } from "@jcsoftdev/ui/calendar";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/calendar/week-view.

<WeekView
week="2026-10-08"
today="2026-10-08"
currentTime="11:45"
events={events}
markers={markers}
shadedDates={["2026-10-11"]}
workingHours={[10, 19]}
locale="es-PE"
weekStartsOn={1}
allDayLabel="Todo el día"
/>
Prop Type Default Description
week * string Any “YYYY-MM-DD” date inside the week to show.
today * string “YYYY-MM-DD” date highlighted as today; the view never computes it.
currentTime string Current time “HH:mm” for the “now” line; without it no line is drawn.
events * CalendarEvent[]
markers CalendarMarker[] [] Markers render in the all-day row.
shadedDates string[] [] Dates (“YYYY-MM-DD”) rendered with a hatch pattern (non-working days).
workingHours readonly [number, number] Highlighted band of working hours, [start, end) in hours.
locale string
weekStartsOn 0 | 2 | 1 | 4 | 3 | 5 | 6 1 First day of the week, 0 (Sunday) to 6 (Saturday). Defaults to 1 (Monday).
allDayLabel * string Label of the all-day row.
dayIntent string
aria-label string
onOpenEvent ((id: string) => void)
onOpenMarker ((id: string) => void)
className string
classNames Partial<Record<WeekViewPart, string>> Per-part classes merged with cn; consumer classes win. className still targets the root and is merged last.

* marks a required prop.

packages/ui/src/calendar/week-view/week-view.tsx