calendar-demo.tsx — ui Source File
Architecture documentation for calendar-demo.tsx, a tsx file in the ui codebase. 10 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab["calendar-demo.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 f9e8c1ea_9de4_3e04_ca27_b15cada2e81e["date-fns"] 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab --> f9e8c1ea_9de4_3e04_ca27_b15cada2e81e d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 bfc8708c_7488_3983_8998_32b793781735["react-day-picker"] 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab --> bfc8708c_7488_3983_8998_32b793781735 dde83612_b728_e23b_d3a8_dccad8858873["locale"] 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab --> dde83612_b728_e23b_d3a8_dccad8858873 57e86e45_ac6e_7278_be08_9092724e8401["button"] 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab --> 57e86e45_ac6e_7278_be08_9092724e8401 7bfe56e6_25f1_1b2f_588d_f14238c3c071["calendar"] 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab --> 7bfe56e6_25f1_1b2f_588d_f14238c3c071 c6d6139d_ea69_3d79_5004_68419bae2ac0["card"] 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab --> c6d6139d_ea69_3d79_5004_68419bae2ac0 80cf663d_a411_487c_d69e_ac9d405cd2ec["input"] 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab --> 80cf663d_a411_487c_d69e_ac9d405cd2ec d752035b_6ed3_c6ef_e27c_eef51af9ec8d["label"] 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab --> d752035b_6ed3_c6ef_e27c_eef51af9ec8d 1c2403dc_4584_9f39_4e98_855a7de18bd1["component-registry.ts"] 1c2403dc_4584_9f39_4e98_855a7de18bd1 --> 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab style 5fbf849d_fd5d_8f6c_88e7_5a64a8f219ab fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { addDays } from "date-fns"
import { Clock2Icon } from "lucide-react"
import { type DateRange } from "react-day-picker"
import { es } from "react-day-picker/locale"
import { Button } from "@/registry/new-york-v4/ui/button"
import { Calendar, CalendarDayButton } from "@/registry/new-york-v4/ui/calendar"
import { Card, CardContent, CardFooter } from "@/registry/new-york-v4/ui/card"
import { Input } from "@/registry/new-york-v4/ui/input"
import { Label } from "@/registry/new-york-v4/ui/label"
export function CalendarDemo() {
return (
<div className="bg-muted flex flex-1 flex-col flex-wrap justify-center gap-8 p-10 lg:flex-row">
<CalendarSingle />
<CalendarMultiple />
<CalendarRange />
<CalendarBookedDates />
<CalendarRangeMultipleMonths />
<CalendarWithTime />
<CalendarWithPresets />
<CalendarCustomDays />
</div>
)
}
function CalendarSingle() {
const [date, setDate] = React.useState<Date | undefined>(
new Date(new Date().getFullYear(), new Date().getMonth(), 12)
)
return (
<div className="flex flex-col gap-3">
<div className="px-2 text-center text-sm">Single Selection</div>
<Calendar
mode="single"
selected={date}
onSelect={setDate}
className="rounded-lg border shadow-sm"
captionLayout="dropdown"
/>
</div>
)
}
function CalendarMultiple() {
return (
<div className="flex flex-col gap-3">
<div className="px-2 text-center text-sm">Multiple Selection</div>
<Calendar mode="multiple" className="rounded-lg border shadow-sm" />
</div>
)
}
function CalendarRange() {
const [dateRange, setDateRange] = React.useState<DateRange | undefined>({
from: new Date(new Date().getFullYear(), 0, 12),
to: addDays(new Date(new Date().getFullYear(), 0, 12), 30),
// ... (217 more lines)
Domain
Subdomains
Functions
Dependencies
- button
- calendar
- card
- date-fns
- input
- label
- locale
- lucide-react
- react
- react-day-picker
Source
Frequently Asked Questions
What does calendar-demo.tsx do?
calendar-demo.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, Changelog subdomain.
What functions are defined in calendar-demo.tsx?
calendar-demo.tsx defines 9 function(s): CalendarBookedDates, CalendarCustomDays, CalendarDemo, CalendarMultiple, CalendarRange, CalendarRangeMultipleMonths, CalendarSingle, CalendarWithPresets, CalendarWithTime.
What does calendar-demo.tsx depend on?
calendar-demo.tsx imports 10 module(s): button, calendar, card, date-fns, input, label, locale, lucide-react, and 2 more.
What files import calendar-demo.tsx?
calendar-demo.tsx is imported by 1 file(s): component-registry.ts.
Where is calendar-demo.tsx in the architecture?
calendar-demo.tsx is located at apps/v4/app/(internal)/sink/components/calendar-demo.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/app/(internal)/sink/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free