allowInput
Description
If true, allows input.
Type
booleanDefault
trueLeave Yamada UI a star
StarDatePicker is a component used for users to select a date.
Description
If true, allows input.
Type
booleanDefault
trueDescription
If true, allows input of dates beyond the minDate and maxDate restrictions.
Type
booleanDefault
trueDescription
The number of months to display.
Type
numberDefault
1Description
The animation of the popover.
Type
"bottom" | "left" | "right" | "scale" | "top" | "none"Default
'scale'Description
The boundary area for the popper. Used within the preventOverflow modifier.
Type
HTMLElement | "clippingParents" | "scrollParent"Default
'clippingParents'Description
ColorScheme for the calendar component.
Type
ThemeColorSchemeDescription
Props for calendar component.
Type
CalendarBasePropsDescription
Size for the calendar component.
Type
UIValue<"lg" | "md" | "sm" | ({} & string) | "full">Description
Variant for the calendar component.
Type
UIValue<({} & string) | "solid" | "subtle" | "unstyled">Description
If true, display the date picker clear icon.
Type
booleanDefault
trueDescription
Props for date picker clear icon element.
Type
DatePickerIconPropsDescription
The number of delay time to close.
Type
numberDefault
200Description
If true, the popover will close when you blur out it by clicking outside or tabbing out.
Type
booleanDefault
trueDescription
If true, the popover will close when you hit the Esc key.
Type
booleanDefault
trueDescription
If true, the calendar component will be closed when value is selected.
Type
booleanDefault
trueDescription
The visual color appearance of the component.
Type
"blackAlpha" | "whiteAlpha" | "amber" | "blue" | "info" | "link" | "primary" | "cyan" | "emerald" | "flashy" | "fuchsia" | "gray" | "green" | "success" | "indigo" | "lime" | "neutral" | "orange" | "warning" | "pink" | "purple" | "red" | "danger" | "rose" | "sky" | "teal" | "violet" | "secondary" | "yellow"Description
Props for date picker container element.
Type
Omit<HTMLUIProps, "children">Description
Props for month picker container element.
Type
Omit<MotionProps, "children">Description
The format used for conversion. Check the docs to see the format of possible modifiers you can pass.
Type
stringDefault
'MMMM YYYY'Docs
https://day.js.org/docs/en/display/format#list-of-localized-formatsDescription
If true, the popover will be initially opened.
Deprecated
Use defaultOpen instead
Type
booleanDescription
The initial month of the calendar.
Type
DateDefault
'new Date()'Description
If true, the popover will be initially opened.
Type
booleanDescription
The initial type of the calendar.
Type
"month" | "date" | "year"Description
The initial value of the calendar.
Type
DateDescription
If true, the form control will be disabled.
Type
booleanDefault
falseDescription
If true, outside days will be disabled.
Type
booleanDefault
falseDescription
The animation duration.
Type
number | MotionLifecycleProps<number>Description
The border color when the input is invalid.
Type
stringDescription
If provided, determines whether the popper will reposition itself on scroll and resize of the window.
Type
type ONLY_FOR_FORMAT =
| boolean
| { resize?: boolean | undefined; scroll?: boolean | undefined }Default
trueDescription
Callback function to determine whether the day should be disabled.
Type
(date: Date) => booleanDescription
Props for date picker field element.
Type
Omit<DatePickerFieldProps, "children" | "inputProps">Description
Define the first day of the week.
Type
"monday" | "sunday"Default
'monday'Description
If true, the popper will change its placement and flip when it's about to overflow its boundary area.
Type
booleanDefault
trueDescription
The border color when the input is focused.
Type
stringDescription
The distance or margin between the reference and popper.
It is used internally to create an offset modifier.
Type
UIValue<number>Default
8Description
Define holidays.
Type
Date[]Description
Props for date picker icon element.
Type
DatePickerIconPropsDescription
The format used for conversion. Check the docs to see the format of possible modifiers you can pass.
Type
stringDefault
'YYYY/MM/DD'Docs
https://day.js.org/docs/en/display/format#list-of-localized-formatsDescription
Props for date picker input element.
Type
UIProps &
Omit<HTMLProps<"input">, keyof UIProps> &
RefAttributes<HTMLInputElement>Description
If true, the form control will be invalid.
Type
booleanDefault
falseDescription
If true, display the date picker clear icon.
Deprecated
Use clearable instead.
Type
booleanDefault
trueDescription
If true, the form control will be disabled.
Deprecated
Use disabled instead.
Type
booleanDefault
falseDescription
If true, the form control will be invalid.
Deprecated
Use invalid instead.
Type
booleanDefault
falseDescription
If true, the PopoverContent rendering will be deferred until the popover is open.
Deprecated
Use lazy instead
Type
booleanDefault
falseDescription
If true, the popover will be opened.
Deprecated
Use open instead
Type
booleanDescription
If true, the form control will be readonly.
Deprecated
Use readOnly instead.
Type
booleanDefault
falseDescription
If true, the form control will be required.
Deprecated
Use required instead.
Type
booleanDefault
falseDescription
If true, the PopoverContent rendering will be deferred until the popover is open.
Type
booleanDefault
falseDescription
The lazy behavior of popover's content when not visible. Only works when lazy={true}
- unmount: The popover's content is always unmounted when not open.
- keepMounted: The popover's content initially unmounted, but stays mounted when popover is open.
Type
LazyModeDefault
'unmount'Description
The locale of the calendar. Check the docs to see the locale of possible modifiers you can pass.
Type
stringDefault
'en-US'Docs
https://day.js.org/docs/en/i18n/instance-localeDescription
If true, the popper will match the width of the reference at all times.
It's useful for autocomplete, date-picker and select patterns.
Type
booleanDefault
falseDescription
The maximum possible date.
Type
DateDescription
The maximum selectable value.
Type
numberDescription
The minimum possible date.
Type
DateDescription
The minimum selectable value.
Type
numberDescription
Array of popper.js modifiers. Check the docs to see the list of possible modifiers you can pass.
Type
Partial<Modifier<string, any>>[]Docs
https://popper.js.org/docs/v2/modifiers/Description
The month of the calendar.
Type
DateDescription
The format used for conversion. Check the docs to see the format of possible modifiers you can pass.
Type
stringDefault
'MM'Docs
https://day.js.org/docs/en/display/format#list-of-localized-formatsDescription
The main and cross-axis offset to displace popper element from its reference element.
Type
[number, number]Description
The callback invoked when value state changes.
Type
(value: Date | undefined) => voidDescription
The callback invoked when month state changes.
Type
(value: Date) => voidDescription
The callback invoked when type state changes.
Type
(
type: "month" | "date" | "year",
year?: number | undefined,
month?: number | undefined,
) => voidDescription
Callback fired when the popover closes.
Type
() => voidDescription
Callback fired when the popover opens.
Type
() => voidDescription
If true, the popover will be opened.
Type
booleanDescription
The number of delay time to open.
Type
numberDefault
200Description
The number of months to paginate.
Type
numberDefault
1Description
Function that converts the input value to Date type.
Type
(value: string) => Date | undefinedDescription
The pattern used to check the input element.
Type
RegExpDefault
'/[^0-9-/]/g'Description
The placement of the popper relative to its reference.
Type
UIValue<Placement>Default
'bottom'Description
Props to be forwarded to the portal component.
Type
Omit<PortalProps, "children">Default
'{ disabled: true }'Description
If true, will prevent the popper from being cut off and ensure it's visible within the boundary area.
Type
booleanDefault
trueDescription
If true, the form control will be readonly.
Type
booleanDefault
falseDescription
If true, the form control will be required.
Type
booleanDefault
falseDescription
The size of the DatePicker.
Type
"xs" | "sm" | "md" | "lg" | "xl"Default
"md"Description
The CSS positioning strategy to use.
Type
"absolute" | "fixed"Default
'absolute'Description
If true, highlight today.
Type
booleanDefault
falseDescription
The type of the calendar.
Type
"month" | "date" | "year"Description
The value of the calendar.
Type
DateDescription
The variant of the DatePicker.
Type
"filled" | "flushed" | "outline" | "unstyled"Default
"outline"Description
The format used for conversion. Check the docs to see the format of possible modifiers you can pass.
Type
stringDefault
'dd'Docs
https://day.js.org/docs/en/display/format#list-of-localized-formatsDescription
Define weekend days.
Type
number[]Default
'[0, 6]'Description
If true, display the calendar control buttons.
Type
booleanDefault
trueDescription
If true, display the calendar header.
Type
booleanDefault
trueDescription
If true, display the calendar label button.
Type
booleanDefault
trueDescription
If true, display the calendar weekdays.
Type
booleanDefault
trueDescription
The format used for conversion. Check the docs to see the format of possible modifiers you can pass.
Type
stringDefault
'YYYY'Docs
https://day.js.org/docs/en/display/format#list-of-localized-formatsEdit this page on GitHub