CalendarCustomDays() — ui Function Reference
Architecture documentation for the CalendarCustomDays() function in calendar-custom-days.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 8c6090e9_ec55_e801_0389_99a602c231f6["CalendarCustomDays()"] 71b1c790_5dfe_d348_e71d_ab6d4906e3d1["calendar-custom-days.tsx"] 8c6090e9_ec55_e801_0389_99a602c231f6 -->|defined in| 71b1c790_5dfe_d348_e71d_ab6d4906e3d1 style 8c6090e9_ec55_e801_0389_99a602c231f6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/radix/calendar-custom-days.tsx lines 9–50
export 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 (
<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>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does CalendarCustomDays() do?
CalendarCustomDays() is a function in the ui codebase, defined in apps/v4/examples/radix/calendar-custom-days.tsx.
Where is CalendarCustomDays() defined?
CalendarCustomDays() is defined in apps/v4/examples/radix/calendar-custom-days.tsx at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free