Date Picker
A button that opens a Calendar in a Popover and shows the picked date in words.
Installation
pnpm add @heyramzi/ui bits-uiUsage
import * as Popover from "@heyramzi/ui/shadcn/popover";API reference
Popover
portalPropsWithoutChildrenOrChild<ComponentProps<typeof PopoverPortal>>refbindableHTMLElement | null- Default
null classstringsideOffsetnumber- Default
4 alignstring- Default
"center" collisionPaddingnumber- Default
8 ...rest- Every prop of
Popover.Contentfrombits-ui
| Prop | Type | Default |
|---|---|---|
portalProps | WithoutChildrenOrChild<ComponentProps<typeof PopoverPortal>> | |
ref bindable | HTMLElement | null | null |
class | string | |
sideOffset | number | 4 |
align | string | "center" |
collisionPadding | number | 8 |
...rest | Every prop of Popover.Content from bits-ui | |
Calendar
buttonVariant"default" | "outline" | "ghost" | "destructive" | "text" | "dashed"- Default
"ghost" captionLayout"dropdown" | "dropdown-months" | "dropdown-years" | "label"- Default
"label" monthsCalendarPrimitive.MonthSelectProps["months"]yearsCalendarPrimitive.YearSelectProps["years"]monthFormatCalendarPrimitive.MonthSelectProps["monthFormat"]yearFormatCalendarPrimitive.YearSelectProps["yearFormat"]- Default
"numeric" daySnippet<[{ day: DateValue; outsideMonth: boolean }]>refbindableHTMLElement | null- Default
null valuebindableCalendar.RootplaceholderbindableCalendar.RootclassstringweekdayFormatstring- Default
"short" localestring- Default
"en-US" disableDaysOutsideMonthboolean- Default
false weekStartsOnnumber- Default
1 fixedWeeksboolean- Default
true ...rest- Every prop of
Calendar.Rootfrombits-uiexceptchild, children
| Prop | Type | Default |
|---|---|---|
buttonVariant | "default" | "outline" | "ghost" | "destructive" | "text" | "dashed" | "ghost" |
captionLayout | "dropdown" | "dropdown-months" | "dropdown-years" | "label" | "label" |
months | CalendarPrimitive.MonthSelectProps["months"] | |
years | CalendarPrimitive.YearSelectProps["years"] | |
monthFormat | CalendarPrimitive.MonthSelectProps["monthFormat"] | |
yearFormat | CalendarPrimitive.YearSelectProps["yearFormat"] | "numeric" |
day | Snippet<[{ day: DateValue; outsideMonth: boolean }]> | |
ref bindable | HTMLElement | null | null |
value bindable | Calendar.Root | |
placeholder bindable | Calendar.Root | |
class | string | |
weekdayFormat | string | "short" |
locale | string | "en-US" |
disableDaysOutsideMonth | boolean | false |
weekStartsOn | number | 1 |
fixedWeeks | boolean | true |
...rest | Every prop of Calendar.Root from bits-ui except child, children | |