Home / File/ calendar-19.tsx — ui Source File

calendar-19.tsx — ui Source File

Architecture documentation for calendar-19.tsx, a tsx file in the ui codebase. 5 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 5 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  67177f74_4a7c_550e_a581_4ad209bb97e8["calendar-19.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  67177f74_4a7c_550e_a581_4ad209bb97e8 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  f9e8c1ea_9de4_3e04_ca27_b15cada2e81e["date-fns"]
  67177f74_4a7c_550e_a581_4ad209bb97e8 --> f9e8c1ea_9de4_3e04_ca27_b15cada2e81e
  d418ad18_b947_f4e5_6e4c_01100d7a63e4["button"]
  67177f74_4a7c_550e_a581_4ad209bb97e8 --> d418ad18_b947_f4e5_6e4c_01100d7a63e4
  9296b496_7dcb_ebca_2184_14782807983b["calendar"]
  67177f74_4a7c_550e_a581_4ad209bb97e8 --> 9296b496_7dcb_ebca_2184_14782807983b
  40a08bc2_b80f_cbb3_c3f5_f3ceafbb7d31["card"]
  67177f74_4a7c_550e_a581_4ad209bb97e8 --> 40a08bc2_b80f_cbb3_c3f5_f3ceafbb7d31
  style 67177f74_4a7c_550e_a581_4ad209bb97e8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { addDays } from "date-fns"

import { Button } from "@/registry/default/ui/button"
import { Calendar } from "@/registry/default/ui/calendar"
import { Card, CardContent, CardFooter } from "@/registry/default/ui/card"

export default function Calendar19() {
  const [date, setDate] = React.useState<Date | undefined>(
    new Date(2025, 5, 12)
  )

  return (
    <Card className="max-w-[300px] py-4">
      <CardContent className="px-4">
        <Calendar
          mode="single"
          selected={date}
          onSelect={setDate}
          defaultMonth={date}
          className="bg-transparent p-0 [--cell-size:2.375rem]"
        />
      </CardContent>
      <CardFooter className="flex flex-wrap gap-2 border-t px-4 pb-0 pt-4">
        {[
          { label: "Today", value: 0 },
          { label: "Tomorrow", value: 1 },
          { label: "In 3 days", value: 3 },
          { label: "In a week", value: 7 },
          { label: "In 2 weeks", value: 14 },
        ].map((preset) => (
          <Button
            key={preset.value}
            variant="outline"
            size="sm"
            className="flex-1"
            onClick={() => {
              const newDate = addDays(new Date(), preset.value)
              setDate(newDate)
            }}
          >
            {preset.label}
          </Button>
        ))}
      </CardFooter>
    </Card>
  )
}

Subdomains

Functions

Dependencies

  • button
  • calendar
  • card
  • date-fns
  • react

Frequently Asked Questions

What does calendar-19.tsx do?
calendar-19.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in calendar-19.tsx?
calendar-19.tsx defines 1 function(s): Calendar19.
What does calendar-19.tsx depend on?
calendar-19.tsx imports 5 module(s): button, calendar, card, date-fns, react.
Where is calendar-19.tsx in the architecture?
calendar-19.tsx is located at deprecated/www/registry/default/blocks/calendar-19.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/default/blocks).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free