Home / Function/ Calendar21() — ui Function Reference

Calendar21() — ui Function Reference

Architecture documentation for the Calendar21() function in calendar-21.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  05eac31f_10db_a49d_60d1_931d9dbbc08b["Calendar21()"]
  647a96b7_952f_d6d0_e1c2_f663a7f3cc68["calendar-21.tsx"]
  05eac31f_10db_a49d_60d1_931d9dbbc08b -->|defined in| 647a96b7_952f_d6d0_e1c2_f663a7f3cc68
  style 05eac31f_10db_a49d_60d1_931d9dbbc08b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/__registry__/new-york/blocks/calendar-21.tsx lines 8–42

export default function Calendar21() {
  const [range, setRange] = React.useState<DateRange | undefined>({
    from: new Date(2025, 5, 12),
    to: new Date(2025, 5, 17),
  })

  return (
    <Calendar
      mode="range"
      defaultMonth={range?.from}
      selected={range}
      onSelect={setRange}
      numberOfMonths={1}
      captionLayout="dropdown"
      className="rounded-lg border shadow-sm [--cell-size:2.75rem] md:[--cell-size:3rem]"
      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 ? "$220" : "$100"}</span>}
            </CalendarDayButton>
          )
        },
      }}
    />
  )
}

Subdomains

Frequently Asked Questions

What does Calendar21() do?
Calendar21() is a function in the ui codebase, defined in deprecated/www/__registry__/new-york/blocks/calendar-21.tsx.
Where is Calendar21() defined?
Calendar21() is defined in deprecated/www/__registry__/new-york/blocks/calendar-21.tsx at line 8.

Analyze Your Own Codebase

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

Try Supermodel Free