edbnedbn/ui
ComponentsTablesStandards
GitHub stars
Explorer
    • Welcome
    • Changelog
    • License
    • Form
    • Data Table
    • Date Picker
    • Typeset
    • Alert
    • Aspect Ratio
    • Avatar
    • Badge
    • Breadcrumb
    • Button Group
    • Button
    • Card
    • Empty
    • Input
    • Item
    • Kbd
    • Label
    • Native Select
    • Separator
    • Skeleton
    • Spinner
    • Table
    • Textarea
    • Accordion
    • Checkbox
    • Collapsible
    • Field
    • Input Group
    • Input Otp
    • Progress
    • Radio Group
    • Slider
    • Switch
    • Tabs
    • Toggle Group
    • Toggle
    • Alert Dialog
    • Combobox
    • Command
    • Context Menu
    • Dialog
    • Drawer
    • Dropdown Menu
    • Hover Card
    • Menubar
    • Navigation Menu
    • Popover
    • Select
    • Sheet
    • Tooltip
    • Attachment
    • Bubble
    • Calendar
    • Carousel
    • Chart
    • Direction
    • Marker
    • Message Scroller
    • Message
    • Pagination
    • Questionnaire
    • Resizable
    • Scroll Area
    • Sidebar
    • Sonner
    • Toast

Composition recipe

Date Picker

Compose Calendar inside Popover. The trigger owns the accessible label and the selected date stays controlled by the feature using it.

No standalone wrapper
This recipe intentionally stays in application code. Install only the primitives your implementation uses.

Building blocks

calendarpopoverbutton

Starting point

<Popover>
  <PopoverTrigger render={<Button variant="outline" />}>
    {date ? format(date, "PPP") : "Pick a date"}
  </PopoverTrigger>
  <PopoverContent className="w-auto p-0">
    <Calendar mode="single" selected={date} onSelect={setDate} />
  </PopoverContent>
</Popover>