Yamada UIにスターをあげる

スター
Yamada UIYamada UIv1.5.1

MonthPicker

MonthPickerは、ユーザーが月を選択するために使用されるコンポーネントです。

ソース@yamada-ui/calendar

Props

MonthPickerProps

allowInput

説明

If true, allows input.

タイプ

boolean

デフォルト

true

allowInputBeyond

説明

If true, allows input of dates beyond the minDate and maxDate restrictions.

タイプ

boolean

デフォルト

true

animation

説明

The animation of the popover.

タイプ

"bottom" | "left" | "right" | "scale" | "top" | "none"

デフォルト

'scale'

boundary

説明

The boundary area for the popper. Used within the preventOverflow modifier.

タイプ

HTMLElement | "clippingParents" | "scrollParent"

デフォルト

'clippingParents'

calendarColorScheme

説明

ColorScheme for the calendar component.

タイプ

(string & {}) | "link" | "blue" | "cyan" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "orange" | "pink" | "purple" | "red" | "teal" | "violet" | "yellow" | "primary" | "secondary" | ... 11 more ... | "sky"

calendarProps

説明

Props for calendar component.

タイプ

CalendarBaseProps

calendarSize

説明

Size for the calendar component.

タイプ

UIValue<(string & {}) | "sm" | "md" | "lg" | "full">

calendarVariant

説明

Variant for the calendar component.

タイプ

UIValue<(string & {}) | "solid" | "subtle" | "unstyled">

clearIconProps

説明

Props for month picker clear icon element.

タイプ

DatePickerIconProps

closeDelay

説明

The number of delay time to close.

タイプ

number

デフォルト

200

closeOnBlur

説明

If true, the popover will close when you blur out it by clicking outside or tabbing out.

タイプ

boolean

デフォルト

true

closeOnEsc

説明

If true, the popover will close when you hit the Esc key.

タイプ

boolean

デフォルト

true

closeOnSelect

説明

If true, the calendar component will be closed when value is selected.

タイプ

boolean

デフォルト

true

colorScheme

説明

The visual color appearance of the component.

タイプ

"whiteAlpha" | "blackAlpha" | "gray" | "neutral" | "red" | "danger" | "rose" | "pink" | "flashy" | "orange" | "warning" | "amber" | "yellow" | "lime" | "green" | "success" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "primary" | "info" | "link" | "indigo" | "violet" | "secondary" | "purple" | "fuchsia"

containerProps

説明

Props for month picker container element.

タイプ

Omit<HTMLUIProps<"div">, "children">

contentProps

説明

Props for month picker container element.

タイプ

Omit<MotionProps<"div">, "children">

defaultIsOpen

説明

If true, the popover will be initially opened.

タイプ

boolean

defaultMonth

説明

The initial month of the calendar.

タイプ

Date

デフォルト

'new Date()'

defaultType

説明

The initial type of the month picker.

タイプ

"month" | "year"

デフォルト

'month'

defaultValue

説明

The initial value of the calendar.

タイプ

Date

duration

説明

The animation duration.

タイプ

number | Partial<Record<"exit" | "enter", number>>

errorBorderColor

説明

The border color when the input is invalid.

タイプ

string

eventListeners

説明

If provided, determines whether the popper will reposition itself on scroll and resize of the window.

タイプ

type ONLY_FOR_FORMAT = | boolean | { scroll?: boolean | undefined; resize?: boolean | undefined }

デフォルト

true

fieldProps

説明

Props for month picker field element.

タイプ

Omit<DatePickerFieldProps, "children" | "inputProps">

flip

説明

If true, the popper will change its placement and flip when it's about to overflow its boundary area.

タイプ

boolean

デフォルト

true

focusBorderColor

説明

The border color when the input is focused.

タイプ

string

gutter

説明

The distance or margin between the reference and popper. It is used internally to create an offset modifier.

タイプ

UIValue<number>

デフォルト

8

iconProps

説明

Props for month picker icon element.

タイプ

DatePickerIconProps

inputFormat

説明

The format used for conversion. Check the docs to see the format of possible modifiers you can pass.

タイプ

string

デフォルト

'YYYY/MM/DD'

ドキュメント

https://day.js.org/docs/en/display/format#list-of-localized-formats

inputProps

説明

Props for month picker input element.

タイプ

HTMLUIProps<"input">

isClearable

説明

If true, display the month picker clear icon.

タイプ

boolean

デフォルト

true

isDisabled

説明

If true, the form control will be disabled.

タイプ

boolean

デフォルト

false

isInvalid

説明

If true, the form control will be invalid.

タイプ

boolean

デフォルト

false

isLazy

説明

If true, the PopoverContent rendering will be deferred until the popover is open.

タイプ

boolean

デフォルト

false

isOpen

説明

If true, the popover will be opened.

タイプ

boolean

isReadOnly

説明

If true, the form control will be readonly.

タイプ

boolean

デフォルト

false

isRequired

説明

If true, the form control will be required.

タイプ

boolean

デフォルト

false

lazyBehavior

説明

The lazy behavior of popover's content when not visible. Only works when isLazy={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.

タイプ

LazyMode

デフォルト

'unmount'

matchWidth

説明

If true, the popper will match the width of the reference at all times. It's useful for autocomplete, date-picker and select patterns.

タイプ

boolean

デフォルト

false

maxDate

説明

The maximum possible date.

タイプ

Date

minDate

説明

The minimum possible date.

タイプ

Date

modifiers

説明

Array of popper.js modifiers. Check the docs to see the list of possible modifiers you can pass.

タイプ

Partial<Modifier<string, any>>[]

ドキュメント

https://popper.js.org/docs/v2/modifiers/

month

説明

The month of the calendar.

タイプ

Date

offset

説明

The main and cross-axis offset to displace popper element from its reference element.

タイプ

[number, number]

onChange

説明

The callback invoked when value state changes.

タイプ

(value: Date | undefined) => void

onChangeMonth

説明

The callback invoked when month state changes.

タイプ

(value: Date) => void

onChangeType

説明

The callback invoked when type state changes.

タイプ

(type: "month" | "year") => void

onClose

説明

Callback fired when the popover closes.

タイプ

() => void

onOpen

説明

Callback fired when the popover opens.

タイプ

() => void

openDelay

説明

The number of delay time to open.

タイプ

number

デフォルト

200

parseDate

説明

Function that converts the input value to Date type.

タイプ

(value: string) => Date | undefined

pattern

説明

The pattern used to check the input element.

タイプ

RegExp

デフォルト

'/[^0-9-/]/g'

placement

説明

The placement of the popper relative to its reference.

タイプ

UIValue<Placement>

デフォルト

'bottom'

portalProps

説明

Props to be forwarded to the portal component.

タイプ

Omit<PortalProps, "children">

デフォルト

'{ isDisabled: true }'

preventOverflow

説明

If true, will prevent the popper from being cut off and ensure it's visible within the boundary area.

タイプ

boolean

デフォルト

true

size

説明

The size of the MonthPicker.

タイプ

"xs" | "sm" | "md" | "lg"

デフォルト

md

strategy

説明

The CSS positioning strategy to use.

タイプ

"fixed" | "absolute"

デフォルト

'absolute'

type

説明

The type of the month picker.

タイプ

"month" | "year"

value

説明

The value of the calendar.

タイプ

Date

variant

説明

The variant of the MonthPicker.

タイプ

"outline" | "filled" | "flushed" | "unstyled"

デフォルト

outline

withControls

説明

If true, display the calendar control buttons.

タイプ

boolean

デフォルト

true

withHeader

説明

If true, display the calendar header.

タイプ

boolean

デフォルト

true

withLabel

説明

If true, display the calendar label button.

タイプ

boolean

デフォルト

true

GitHubでこのページを編集する

TimePickerYearPicker