shadcn-solid
DocsComponentsCharts


Get Started
  • Introduction
  • Installation
  • Theming
  • Dark Mode
Form
  • Tanstack Form
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Badge
  • Breadcrumbs
  • Button Group
  • Button
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Command
  • Context Menu
  • Data Table
  • Date Picker
  • Dialog
  • Drawer
  • Dropdown Menu
  • File Field
  • Hover Card
  • Kbd
  • Menubar
  • Navigation Menu
  • Number Field
  • OTP Field
  • Pagination
  • Popover
  • Progress
  • Radio Group
  • Resizable
  • Search
  • Segmented Control
  • Select
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Sonner
  • Switch
  • Table
  • Tabs
  • Text Field
  • Toggle Group
  • Toggle Button
  • Tooltip

Date Picker

A date picker component with range and presets.

Component date-picker-demo not found in registry.

Installation

The Date Picker is built using a composition of the <Popover /> and the <Calendar /> components.

See installation instructions for the Popover and the Calendar components.

Usage

<Calendar mode="single">
  {(props) => (
    <Popover>
      <PopoverTrigger />
      <PopoverPortal>
        <PopoverContent>
          <div>
            <div>
              <CalendarNav action="prev-month" />
              <CalendarLabel />
              <CalendarNav action="next-month" />
            </div>
            <CalendarTable>
              <thead>
                <tr>
                  <Index each={props.weekdays}>
                    {(weekday) => <CalendarHeadCell />}
                  </Index>
                </tr>
              </thead>
              <tbody>
                <Index each={props.weeks}>
                  {(week) => (
                    <tr>
                      <Index each={week()}>
                        {(day) => (
                          <CalendarCell>
                            <CalendarCellTrigger />
                          </CalendarCell>
                        )}
                      </Index>
                    </tr>
                  )}
                </Index>
              </tbody>
            </CalendarTable>
          </div>
        </PopoverContent>
      </PopoverPortal>
    </Popover>
  )}
</Calendar>

Examples

With range

Component date-picker-range-demo not found in registry.

Data TableDialog
Built & designed by shadcn. Ported to Solid by hngngn. The source code is available on GitHub.