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

calendar-time.tsx — ui Source File

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

File tsx DocumentationAtlas Changelog 6 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  e490ab95_c000_2b70_b176_843a7d7884e6["calendar-time.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  e490ab95_c000_2b70_b176_843a7d7884e6 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  a8023de3_411c_8d95_59e9_37549a0c2d75["calendar"]
  e490ab95_c000_2b70_b176_843a7d7884e6 --> a8023de3_411c_8d95_59e9_37549a0c2d75
  a66f2388_87f1_5188_51e6_9a4b91cfd618["card"]
  e490ab95_c000_2b70_b176_843a7d7884e6 --> a66f2388_87f1_5188_51e6_9a4b91cfd618
  e6c524b5_d047_d4f9_50b2_7f100d612cb2["field"]
  e490ab95_c000_2b70_b176_843a7d7884e6 --> e6c524b5_d047_d4f9_50b2_7f100d612cb2
  4a37d855_5768_bc5a_31ae_9f42eba9091a["input-group"]
  e490ab95_c000_2b70_b176_843a7d7884e6 --> 4a37d855_5768_bc5a_31ae_9f42eba9091a
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  e490ab95_c000_2b70_b176_843a7d7884e6 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  style e490ab95_c000_2b70_b176_843a7d7884e6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { Calendar } from "@/examples/base/ui/calendar"
import { Card, CardContent, CardFooter } from "@/examples/base/ui/card"
import { Field, FieldGroup, FieldLabel } from "@/examples/base/ui/field"
import {
  InputGroup,
  InputGroupAddon,
  InputGroupInput,
} from "@/examples/base/ui/input-group"
import { Clock2Icon } from "lucide-react"

export function CalendarWithTime() {
  const [date, setDate] = React.useState<Date | undefined>(
    new Date(new Date().getFullYear(), new Date().getMonth(), 12)
  )

  return (
    <Card size="sm" className="mx-auto w-fit">
      <CardContent>
        <Calendar
          mode="single"
          selected={date}
          onSelect={setDate}
          className="p-0"
        />
      </CardContent>
      <CardFooter className="bg-card border-t">
        <FieldGroup>
          <Field>
            <FieldLabel htmlFor="time-from">Start Time</FieldLabel>
            <InputGroup>
              <InputGroupInput
                id="time-from"
                type="time"
                step="1"
                defaultValue="10:30:00"
                className="appearance-none [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none"
              />
              <InputGroupAddon>
                <Clock2Icon className="text-muted-foreground" />
              </InputGroupAddon>
            </InputGroup>
          </Field>
          <Field>
            <FieldLabel htmlFor="time-to">End Time</FieldLabel>
            <InputGroup>
              <InputGroupInput
                id="time-to"
                type="time"
                step="1"
                defaultValue="12:30:00"
                className="appearance-none [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none"
              />
              <InputGroupAddon>
                <Clock2Icon className="text-muted-foreground" />
              </InputGroupAddon>
            </InputGroup>
          </Field>
        </FieldGroup>
      </CardFooter>
    </Card>
  )
}

Subdomains

Functions

Dependencies

  • calendar
  • card
  • field
  • input-group
  • lucide-react
  • react

Frequently Asked Questions

What does calendar-time.tsx do?
calendar-time.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-time.tsx?
calendar-time.tsx defines 1 function(s): CalendarWithTime.
What does calendar-time.tsx depend on?
calendar-time.tsx imports 6 module(s): calendar, card, field, input-group, lucide-react, react.
Where is calendar-time.tsx in the architecture?
calendar-time.tsx is located at apps/v4/examples/base/calendar-time.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/examples/base).

Analyze Your Own Codebase

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

Try Supermodel Free