14 — Components
Calendar — Day View
Day-by-day match schedule with a mini month picker, competition badges, live scores, and empty state. Three composable primitives assembled into one drop-in view.
1 — CalendarDayView — Live Component
Fully interactive — click any day in the sidebar to see its matches. Navigate between days with the arrow buttons. Switch match days to see different states: results (Mar 1), live (Mar 8), upcoming, and empty.
tsx
import { CalendarDayView } from "@/components/cpsl/calendar"
import type { MatchDay } from "@/components/cpsl/calendar"
// March 2026: startWeekday=0 (1st = Sunday)
<CalendarDayView
monthLabel="MARCH 2026"
daysInMonth={31}
startWeekday={0}
defaultDay={1}
todayDay={1}
matchDays={matchDays}
matches={matches}
onSwitchToMonth={() => router.push("/calendar/month")}
/>2 — CalendarMatchCard — All States
Four status variants. Passes competition to colour-code the badge — blue for Premiership, gold for CPSL Cup.
Upcoming
Live
Full Time
CPSL Cup — Upcoming
Postponed
tsx
import { CalendarMatchCard } from "@/components/cpsl/calendar"
// Upcoming
<CalendarMatchCard
kickoff="14:00"
status="upcoming"
competition="premiership"
matchday={23}
home={{ name: "Charlotte FC", position: 1 }}
away={{ name: "Durham United", position: 3 }}
venue="Matthews Sportsplex, Charlotte NC"
/>
// Live with score
<CalendarMatchCard
kickoff="16:00"
status="live"
minute={34}
competition="premiership"
home={{ name: "Triangle FC", position: 4, score: 1 }}
away={{ name: "Winston-Salem SC", position: 6, score: 0 }}
venue="WakeMed Soccer Park, Cary NC"
/>3 — Primitives
Use DayPicker and CalendarViewToggle independently in your own layouts.
DayPicker
MARCH 2026
M
T
W
T
F
S
S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
THIS DAY
Premiership
3CPSL Cup
0Total matches3
CalendarViewToggle
Month active
Day active
4 — Component API
CalendarDayView
<CalendarDayView
monthLabel="MARCH 2026"
daysInMonth={31}
startWeekday={0} // 0=Sun, 1=Mon
defaultDay={1}
todayDay={3}
matchDays={[
{ day: 1, dots: ["premiership", "cup"] },
]}
matches={[
{ day: 1, kickoff: "14:00",
status: "upcoming",
competition: "premiership",
matchday: 22,
home: { name: "Charlotte FC", position: 1 },
away: { name: "Durham United", position: 3 },
venue: "Matthews Sportsplex" },
]}
onSwitchToMonth={() => {}}
/>CalendarMatchCard
<CalendarMatchCard
kickoff="14:00"
status="upcoming" // upcoming|live|fulltime|postponed
competition="premiership" // or "cup"
matchday={22}
minute={34} // for live status
home={{ name: "Charlotte FC", position: 1, score: 2 }}
away={{ name: "Durham United", position: 3, score: 1 }}
venue="Matthews Sportsplex, Charlotte NC"
onClick={() => router.push("/matches/123")}
/>DayPicker
<DayPicker
monthLabel="MARCH 2026"
daysInMonth={31}
startWeekday={0} // weekday of the 1st (0=Sun)
selectedDay={1}
todayDay={3}
matchDays={[
{ day: 1, dots: ["premiership", "premiership"] },
{ day: 7, dots: ["cup"] },
]}
summary={{ premiership: 3, cup: 0 }}
onDaySelect={(day) => setDay(day)}
onPrevMonth={() => {}}
onNextMonth={() => {}}
/>CalendarViewToggle
<CalendarViewToggle
value="day" // "month" | "day"
onChange={(v) => setView(v)}
/>