Skip to content

Props

This component displays meeting slots grouped by day. It is fully typed and supports advanced customization through props

Props table

PropTypeDefaultRequiredDescription
meetingsByDaysMDay[]trueList of grouped meeting slots by day.
dateFieldKeyDateFieldKeytrueThe key used to extract the slot date (e.g., 'date').
meetingSlotsKeyMeetingSlotsKeytrueThe key used to extract the list of slots of the day.
dateDatetrueThe currently selected or reference date.
valueMSlot | MSlot[] | nulltrueThe currently selected slot(s). Controlled via handleValueChange.
handleValueChange(val: MSlot | null) => void or (val: MSlot[]) => voidtrueCallback invoked when the selection changes. Matches value type.
multibooleanfalsefalseWhether multiple selections are allowed.
calendarOptionsCalendarOptions{}falseConfiguration options for calendar display.
loadingbooleanfalsefalseWhether the calendar is in a loading state.
skipnumberfalseNumber of slot rows to skip. Useful for pagination.
handleSkipChange(skip: number) => voidfalseCallback to update skip manually (controlled pagination).
handlePreviousDate() => voidfalseCallback triggered when going to the previous date range.
handleNextDate() => voidfalseCallback triggered when going to the next date range.
renderButtonPreviousDate(props: { loading: boolean; disabled: boolean }) => React.ReactNodefalseCustom rendering for the "previous date" button.
renderButtonNextDate(props: { loading: boolean; disabled: boolean }) => React.ReactNodefalseCustom rendering for the "next date" button.
renderButtonUpMeetings(props: { loading: boolean; disabled: boolean }) => React.ReactNodefalseCustom rendering for the "previous page" (up) button.
renderButtonDownMeetings(props: { loading: boolean; disabled: boolean }) => React.ReactNodefalseCustom rendering for the "next page" (down) button.
renderHeader(props: { meetings: MDay }) => React.ReactNodefalseCustom rendering for each day's header.
renderMeeting(props: { meeting: MSlot; index: number }) => React.ReactNodefalseCustom rendering for individual meeting slots.
[...HTMLProps]All standard HTMLDivElement props (e.g. id, className, data-*, aria-*)falseYou can pass additional DOM attributes.

Types

MeetingSlot<DateFieldKey>

typescript
export type MeetingSlot<DateFieldKey extends string> = {
  [K in DateFieldKey]: string | Date;
} & Record<string, unknown>;

Represents a single meeting slot. It includes a dynamic date key (DateFieldKey, such as "startAt" or "date"), and any other custom data.

MeetingsByDay<DateFieldKey, MeetingSlotsKey, Slot>

typescript
export type MeetingsByDay<
  DateFieldKey extends string,
  MeetingSlotsKey extends string,
  MSlot extends MeetingSlot<DateFieldKey>
> = {
  [K in DateFieldKey]: string | Date;
} & {
  [K in MeetingSlotsKey]: MSlot[];
} & Record<string, unknown>;

Represents a day grouping multiple slots, each of which follows the MeetingSlot shape.

CalendarOptions

typescript
export type CalendarOptions = {
  daysLabel?: string[]; // Labels for days of the week
  monthsLabel?: string[]; // Labels for months
  limit?: number; // Max number of days to display
  spacing?: number; // Gap between days
  disabledDate?: (date: string | Date) => boolean; // Disable specific dates
};

Use this to control calendar appearance, layout, and behavior.