CalendarCustomDays() — ui Function Reference
Architecture documentation for the CalendarCustomDays() function in calendar-example.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD e832574e_4f4d_9e39_3b46_ca3fed9b1d6e["CalendarCustomDays()"] 56746db4_bde3_b797_f7fa_14d8b5e6af22["calendar-example.tsx"] e832574e_4f4d_9e39_3b46_ca3fed9b1d6e -->|defined in| 56746db4_bde3_b797_f7fa_14d8b5e6af22 style e832574e_4f4d_9e39_3b46_ca3fed9b1d6e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/bases/base/examples/calendar-example.tsx lines 278–321
function CalendarCustomDays() {
const [range, setRange] = React.useState<DateRange | undefined>({
from: new Date(new Date().getFullYear(), 11, 8),
to: addDays(new Date(new Date().getFullYear(), 11, 8), 10),
})
return (
<Example title="Custom Days">
<Card className="mx-auto w-fit p-0">
<CardContent className="p-0">
<Calendar
mode="range"
defaultMonth={range?.from}
selected={range}
onSelect={setRange}
numberOfMonths={1}
captionLayout="dropdown"
className="[--cell-size:--spacing(10)] md:[--cell-size:--spacing(12)]"
formatters={{
formatMonthDropdown: (date) => {
return date.toLocaleString("default", { month: "long" })
},
}}
components={{
DayButton: ({ children, modifiers, day, ...props }) => {
const isWeekend =
day.date.getDay() === 0 || day.date.getDay() === 6
return (
<CalendarDayButton day={day} modifiers={modifiers} {...props}>
{children}
{!modifiers.outside && (
<span>{isWeekend ? "$120" : "$100"}</span>
)}
</CalendarDayButton>
)
},
}}
/>
</CardContent>
</Card>
</Example>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does CalendarCustomDays() do?
CalendarCustomDays() is a function in the ui codebase, defined in apps/v4/registry/bases/base/examples/calendar-example.tsx.
Where is CalendarCustomDays() defined?
CalendarCustomDays() is defined in apps/v4/registry/bases/base/examples/calendar-example.tsx at line 278.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free