Skip to content

    Browse components

    Calendar

    Dependency-free date picker grid with single or range selection, springy month slides, range preview on hover and full keyboard navigation.

    Open
    Customize
    single
    range

    Installation

    npx shadcn@latest add @glint-ui/calendar

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/calendar.json

    Usage

    import { Calendar } from "@/components/ui/calendar";
    
    const [range, setRange] = useState<DateRange>();
    
    <Calendar mode="range" selected={range} onSelect={setRange} weekStartsOn={1} />

    Props

    PropTypeDefaultDescription
    mode"single" | "range""single"Pick one day or a from/to range.
    weekStartsOnnumber00 = Sunday, 1 = Monday.
    localestring"en-US"BCP 47 locale for month and weekday names.
    selectedReactNode—Controlled selection: Date (single) or { from, to } (range).
    defaultSelectedReactNode—Initial selection when uncontrolled.
    onSelectReactNode—Called with the picked Date, or the updated range.
    defaultMonthReactNode—Month shown first (Date).
    minReactNode—Earliest selectable day (Date).
    maxReactNode—Latest selectable day (Date).
    isDateDisabledReactNode—(date) => boolean to block specific days.
    classNamestring—Extra classes for the root element.