| Prop | Default | Type |
|---|---|---|
as | 'div' | AsTag | ComponentThe element or component this component should render as. Can be overwritten by |
asChild | booleanChange the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. | |
closeOnSelect | false | booleanWhether or not to close the popover on date select |
defaultOpen | false | booleanThe open state of the popover when it is initially rendered. Use when you do not need to control its open state. |
defaultPlaceholder | DateValueThe default placeholder date | |
defaultValue | DateValueThe default value for the calendar | |
dir | 'ltr' | 'rtl'The reading direction of the date field when applicable. | |
disabled | false | booleanWhether or not the date field is disabled |
fixedWeeks | false | booleanWhether or not to always display 6 weeks in the calendar |
granularity | 'day' | 'hour' | 'minute' | 'second'The granularity to use for formatting times. Defaults to day if a CalendarDate is provided, otherwise defaults to minute. The field will render segments for each part of the date up to and including the specified granularity | |
hideTimeZone | booleanWhether or not to hide the time zone segment of the field | |
hourCycle | 12 | 24The hour cycle used for formatting times. Defaults to the local preference | |
id | stringId of the element | |
isDateDisabled | MatcherA function that returns whether or not a date is disabled | |
isDateUnavailable | MatcherA function that returns whether or not a date is unavailable | |
locale | 'en' | stringThe locale to use for formatting dates |
maxValue | DateValueThe maximum date that can be selected | |
minValue | DateValueThe minimum date that can be selected | |
modal | false | booleanThe modality of the popover. When set to true, interaction with outside elements will be disabled and only popover content will be visible to screen readers. |
modelValue | DateValue | nullThe controlled checked state of the calendar. Can be bound as | |
name | stringThe name of the field. Submitted with its owning form as part of a name/value pair. | |
numberOfMonths | 1 | numberThe number of months to display at once |
open | booleanThe controlled open state of the popover. | |
pagedNavigation | false | booleanThis property causes the previous and next buttons to navigate by the number of months displayed at once, rather than one month |
placeholder | DateValueThe placeholder date, which is used to determine what month to display when no date is selected. This updates as the user navigates the calendar and can be used to programmatically control the calendar view | |
preventDeselect | false | booleanWhether or not to prevent the user from deselecting a date without selecting another date first |
readonly | false | booleanWhether or not the date field is readonly |
required | booleanWhen | |
step | DateStepThe stepping interval for the time fields. Defaults to | |
weekdayFormat | 'narrow' | 'narrow' | 'short' | 'long'The format to use for the weekday strings provided via the weekdays slot prop |
weekStartsOn | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6The day of the week to start the calendar on |
| Emit | Payload |
|---|---|
update:modelValue | [date: DateValue]Event handler called whenever the model value changes |
update:open | [value: boolean]Event handler called when the open state of the submenu changes. |
update:placeholder | [date: DateValue]Event handler called whenever the placeholder value changes |
| Methods | Type |
|---|---|
isDateDisabled | MatcherA function that returns whether or not a date is disabled |
isDateUnavailable | MatcherA function that returns whether or not a date is unavailable |
