BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/glasswave/date-picker

Date Picker

glasswave/date-picker
FreeComponent

Popover trigger + single-date Calendar.

Live preview

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

Install it

npx shadcn@latest add https://glasswave.denizisik.com/r/date-picker.json

Source

registry/glasswave/ui/date-picker.tsxglasswave.denizisik.com/r/date-picker.json
1"use client";
2
3import { format } from "date-fns";
4import { Calendar as CalendarIcon } from "lucide-react";
5import { useState } from "react";
6import { cn } from "@/lib/utils";
7import { Button } from "@/components/ui/button";
8import { Calendar } from "@/components/ui/calendar";
9import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
10
11export interface DatePickerProps {
12 date?: Date;
13 onDateChange?: (date: Date | undefined) => void;
14 placeholder?: string;
15 className?: string;
16 disabled?: boolean;
17 align?: "start" | "center" | "end";
18 /** `date-fns` pattern, default `PPP` */
19 formatPattern?: string;
20}
21
22export function DatePicker({
23 date,
24 onDateChange,
25 placeholder = "Pick a date",
26 className,
27 disabled,
28 align = "start",
29 formatPattern = "PPP",
30}: DatePickerProps) {
31 const [open, setOpen] = useState(false);
32
33 return (
34 <Popover open={open} onOpenChange={setOpen}>
35 <PopoverTrigger asChild>
36 <Button
37 type="button"
38 variant="glass"
39 disabled={disabled}
40 className={cn(
41 "min-w-[240px] justify-start text-left font-normal",
42 !date && "text-current/55",
43 className,
44 )}
45 >
46 <CalendarIcon className="size-4 shrink-0 opacity-70" aria-hidden />
47 {date ? format(date, formatPattern) : placeholder}
48 </Button>
49 </PopoverTrigger>
50 <PopoverContent className="w-auto p-0" align={align}>
51 <Calendar
52 mode="single"
53 selected={date}
54 onSelect={(d) => {
55 onDateChange?.(d);
56 setOpen(false);
57 }}
58 autoFocus
59 />
60 </PopoverContent>
61 </Popover>
62 );
63}

What it pulls in

npm packages

  • date-fns
  • lucide-react

Other registry items

  • @glasswave/button
  • @glasswave/calendar
  • @glasswave/popover

Files it writes

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

Facts

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

Go to the source

Docs on glasswave glasswave.denizisik.com deniiiiz-i/glasswave on GitHub Raw registry item This item as JSON

More from glasswave

All 60 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionglasswaveComponentsFree2 deps
AlertalertglasswaveComponentsFree1 dep
Alert Dialogalert-dialogglasswaveComponentsFree1 dep
Aspect Ratioaspect-ratioglasswaveComponentsFree1 dep
AvataravatarglasswaveComponentsFree1 dep
BadgebadgeglasswaveComponentsFree1 dep
BreadcrumbbreadcrumbglasswaveComponentsFree2 deps
ButtonbuttonglasswaveComponentsFree2 deps
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