Calendar view

Archived Cal.com Atoms documentation for Calendar view. These deprecated SDK components are no longer maintained.

The calendar view atom is a weekly calendar where users see the entire week at a glance, with available and unavailable time slots clearly marked. It has two modes: an event type view that shows the bookable slots of one event type, and a users view that overlays the busy times and shared availability of a set of users so a meeting can be placed between them.

Event type view

Pass isEventTypeView together with the event slug and either a username (individual event) or a team id (team event).

Individual event type

import { CalendarView } from "@calcom/atoms";

export default function Calendar( props : CalendarProps ) {
  return (
    <div>
       <CalendarView isEventTypeView username={props.calUsername} eventSlug={props.eventSlug} />
    </div>
  )
}

Team event type

import { CalendarView } from "@calcom/atoms";

export default function Calendar( props : CalendarProps ) {
  return (
    <div>
       <CalendarView isEventTypeView teamId={props.teamId} eventSlug={props.eventSlug} />
    </div>
  )
}

For a demonstration of the event type view, please refer to the video below.

Watch the video

Props accepted in the event type view:

Users view

Without isEventTypeView, the atom renders the busy times of the given users, colored by their order in userIds, and their intersected availability as clickable slots. Omit userIds to show the authenticated user's own calendar.

import { CalendarView } from "@calcom/atoms";

export default function InterviewCalendar( props : InterviewCalendarProps ) {
  return (
    <div>
       <CalendarView
         userIds={props.interviewerIds}
         eventTypeId={props.eventTypeId}
         bookingUid={props.bookingUid}
         timezone={props.meetingTimezone}
         onTimezoneChange={props.onMeetingTimezoneChange}
         showTimezoneControls
         showSlotIntervalControls
         onCellClick={(date) => props.onSlotPicked(date)}
         onEventClick={(event) => props.onBookingOpened(event)}
       />
    </div>
  )
}

Props accepted in the users view. All of them are optional.

Last updated