UNPKG

@wix/design-system

Version:

@wix/design-system

50 lines (47 loc) 2.32 kB
### dataHook - type: string - description: Applies a data-hook HTML attribute that can be used in the tests ### className - type: string - description: Specifies a CSS class name to be appended to the component’s root element. - internal ### onChange - type: (selectedDays: SelectedDaysType) => void - description: Defines a callback function which is called whenever the user selects a day or a date range in the calendar ### onClose - type: (e: SyntheticEvent<Element, Event>) => void - description: Defines a callback function which is called whenever user press `escape` or click outside of the element ### excludePastDates - type: boolean - description: Specifies whether past dates should be selectable or not ### filterDate - type: (date: Date) => boolean - description: Specifies dates that are selectable. Only the dates that match defined criteria will be available for a user to select. ### value - type: string | Date | DateRangeType - description: Defines a selected date or date range ### numOfMonths - type: number - description: Defines a number of months to display inside of a panel - default: 2 ### selectionMode - type: "day" | "range" - description: Specifies if user can select a single day or a date range ### showYearDropdown - type: boolean - description: Specifies whether to display a year selection dropdown inside of a calendar ### showMonthDropdown - type: boolean - description: Specifies whether to display a month selection dropdown inside of a calendar ### shouldCloseOnSelect - type: boolean - description: Specifies whether calendar should close on a day selection ### locale - type: SupportedWixLocales | Locale - description: Specifies date picker instance locale ### presets - type: PresetType[] | { selectedDays?: SelectedDaysType | undefined; id?: string | number | undefined; } - description: Defines an array of predefined calendar presets that are displayed as select items on the left side of a panel ### footer - type: (selectedDays: SelectedDaysType, submitDisabled: boolean) => void - description: Renders a panel footer. Pass `<CalendarPanelFooter/>` in all common cases. `({selectedDays, submitDisabled}) => void` - `selectedDays` is the same as the CalendarPanel's `value` prop. `submitDisabled` is true when the current selectedDays is not valida for submission.