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
  55f8ccc8_0a6f_1601_7df8_39cbe0371107["calendar-time.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  55f8ccc8_0a6f_1601_7df8_39cbe0371107 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  4bae96d1_8974_035f_9042_62ec299030b9["calendar"]
  55f8ccc8_0a6f_1601_7df8_39cbe0371107 --> 4bae96d1_8974_035f_9042_62ec299030b9
  a3f5dc6c_2f22_a06c_c4d4_d84a4ed2818e["card"]
  55f8ccc8_0a6f_1601_7df8_39cbe0371107 --> a3f5dc6c_2f22_a06c_c4d4_d84a4ed2818e
  b5f68436_cf6b_fba3_fb29_abf27fd13442["field"]
  55f8ccc8_0a6f_1601_7df8_39cbe0371107 --> b5f68436_cf6b_fba3_fb29_abf27fd13442
  d4ae1ebd_39ec_2b17_5c84_fbca1aec26c7["input-group"]
  55f8ccc8_0a6f_1601_7df8_39cbe0371107 --> d4ae1ebd_39ec_2b17_5c84_fbca1aec26c7
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  55f8ccc8_0a6f_1601_7df8_39cbe0371107 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  style 55f8ccc8_0a6f_1601_7df8_39cbe0371107 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { Calendar } from "@/examples/radix/ui/calendar"
import { Card, CardContent, CardFooter } from "@/examples/radix/ui/card"
import { Field, FieldGroup, FieldLabel } from "@/examples/radix/ui/field"
import {
  InputGroup,
  InputGroupAddon,
  InputGroupInput,
} from "@/examples/radix/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/radix/calendar-time.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/examples/radix).

Analyze Your Own Codebase

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

Try Supermodel Free