Skip to main content
PROYECTOVIVIANA

Calendar

The props declared for Calendar, generated from the types @proyecto-viviana/ui ships.

Import

import { Calendar } from "@proyecto-viviana/ui";

Props

Props for Calendar in @proyecto-viviana/ui
PropTypeDefaultDescription
size'S' | 'M' | 'L' | 'XL' | 'sm' | 'md' | 'lg' | 'xl''md'The size of the calendar.
stylesStyleString | (() => StyleString | undefined)—Spectrum-defined generated classes.
UNSAFE_classNamestring | UnsafeClassName—Additional CSS class name. Use only as a last resort.
UNSAFE_styleJSX.CSSProperties—Additional inline styles. Use only as a last resort.
classstring—Additional CSS class name.
showWeekNumbersfalse | true—Whether to show week numbers.
localestring—The locale to use for formatting.
firstDayOfWeek0 | 5 | 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 1 | 2 | 3 | 4 | 6—The day that starts the week.
isInvalidfalse | true—Whether the current selection is invalid according to application logic.
validationStateValidationState | Accessor<ValidationState | undefined>—Validation state for backward-compatible Solid Stately callers.
errorMessagenumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—The error message to display when the calendar is invalid.
aria-labelstring—Custom aria label.
slotstring—Not yet documented
refHTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; }—Not yet documented
onChange(value: T | null) => void—Handler called when the value changes. solid-stately
isDisabledMaybeAccessor<boolean>—Whether the calendar is disabled. solid-stately
autoFocusfalse | true—Whether dates outside the visible range are automatically focused. solid-stately
valueT | Accessor<T | null | undefined>—The current value (controlled). solid-stately
onFocusChange(date: CalendarDate) => void—Handler called when the focused date changes. solid-stately
selectionModeMaybeAccessor<"single">—Whether single or multiple date selection is enabled. solid-stately
defaultValueT—The default value (uncontrolled). solid-stately
minValueDateValue | Accessor<DateValue | undefined>—The minimum allowed date. solid-stately
maxValueDateValue | Accessor<DateValue | undefined>—The maximum allowed date. solid-stately
isReadOnlyMaybeAccessor<boolean>—Whether the calendar is read-only. solid-stately
focusedValueDateValue | Accessor<DateValue | null | undefined>—The date that is focused when the calendar first mounts. solid-stately
defaultFocusedValueDateValue—The default focused date (uncontrolled). solid-stately
createCalendar(identifier: CalendarIdentifier) => InternationalizedCalendar—Creates a calendar object for a locale calendar identifier. solid-stately
isDateUnavailable(date: DateValue) => boolean—Callback that is called for each date in the calendar to determine if it is unavailable. solid-stately
visibleMonthsnumber | Accessor<number | undefined>—The number of months to display at once. solid-stately
pageBehavior'single' | 'visible'—Controls whether paging advances by one month or by the visible month range. solid-stately
selectionAlignment'start' | 'end' | 'center'—Determines how the visible months align around the initial focused date. solid-stately
autoFocusOnMountfalse | true—Whether to automatically focus the calendar when it is mounted. solid-stately
isDateDisabled(date: DateValue) => boolean—Controls which days are disabled. solid-stately

Declared in packages/viviana-ui/src/calendar/index.tsx.

Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.