BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/solid-ui/date-picker

Date Picker

solid-ui/date-picker
FreeComponent

A date picker component

Live preview

live · rendered by the registry
Rendered by solid-ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://www.solid-ui.com/r/date-picker.json

Source

src/registry/ui/date-picker.tsxwww.solid-ui.com/r/date-picker.json · first 6 KB
1import { children, Show, splitProps } from "solid-js"
2
3import { DatePicker as DatePickerPrimitive } from "@ark-ui/solid"
4
5import { cn } from "~/lib/utils"
6import { buttonVariants } from "~/registry/ui/button"
7
8const DatePicker = DatePickerPrimitive.Root
9const DatePickerLabel = DatePickerPrimitive.Label
10const DatePickerContext = DatePickerPrimitive.Context
11const DatePickerTableHead = DatePickerPrimitive.TableHead
12const DatePickerTableBody = DatePickerPrimitive.TableBody
13const DatePickerYearSelect = DatePickerPrimitive.YearSelect
14const DatePickerMonthSelect = DatePickerPrimitive.MonthSelect
15const DatePickerPositioner = DatePickerPrimitive.Positioner
16
17const DatePickerControl = (props: DatePickerPrimitive.ControlProps) => {
18 const [local, others] = splitProps(props, ["class"])
19 return (
20 <DatePickerPrimitive.Control
21 class={cn("inline-flex items-center gap-1", local.class)}
22 {...others}
23 />
24 )
25}
26
27const DatePickerInput = (props: DatePickerPrimitive.InputProps) => {
28 const [local, others] = splitProps(props, ["class"])
29 return (
30 <DatePickerPrimitive.Input
31 class={cn(
32 "h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-shadow placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
33 local.class
34 )}
35 {...others}
36 />
37 )
38}
39
40const DatePickerTrigger = (props: DatePickerPrimitive.TriggerProps) => {
41 const [local, others] = splitProps(props, ["class", "children"])
42
43 // prevents rendering children twice
44 const resolvedChildren = children(() => local.children)
45 const hasChildren = () => resolvedChildren.toArray().length !== 0
46
47 return (
48 <DatePickerPrimitive.Trigger
49 class={cn(
50 "flex min-h-9 min-w-9 items-center justify-center rounded-md border border-border bg-background transition-[box-shadow,background-color] hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>svg]:size-4",
51 local.class
52 )}
53 {...others}
54 >
55 <Show when={!hasChildren()} fallback={resolvedChildren()}>
56 <svg
57 xmlns="http://www.w3.org/2000/svg"
58 viewBox="0 0 24 24"
59 fill="none"
60 stroke="currentColor"
61 stroke-width="2"
62 stroke-linecap="round"
63 stroke-linejoin="round"
64 class="size-4"
65// … truncated

What it pulls in

npm packages

  • solid-js
  • @ark-ui/solid

Other registry items

  • https://solid-ui.com/r/button.json

Files it writes

  • src/registry/ui/date-picker.tsx

Facts

Registry
solid-ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
today

Go to the source

Docs on solid-ui www.solid-ui.com stefan-karger/solid-ui on GitHub Raw registry item This item as JSON

More from solid-ui

All 55 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionsolid-uiComponentsFree2 deps
Alertalertsolid-uiComponentsFree3 deps
Alert Dialogalert-dialogsolid-uiComponentsFree2 deps
Aspect Ratioaspect-ratiosolid-uiComponentsFree1 dep
Avataravatarsolid-uiComponentsFree2 deps
Badgebadgesolid-uiComponentsFree2 deps
Badge Deltabadge-deltasolid-uiComponentsFree2 deps
Bar Listbar-listsolid-uiComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex