- Overview
- Introduction to Cal.com Atoms
- Setup
- Apple calendar connect
- Availability settings
- Booker Embed
- Booker
- Bookings hooks
- Cal OAuth Provider
- Cal Provider
- Calendar settings
- Calendar view
- Calendars hooks
- Conferencing Apps
- Create schedule
- Event Type
- Event types hooks
- FAQ
- Google calendar connect
- List Event Types
- List schedules
- Onboarding Embed
- Outlook calendar connect
- Payment form
- Quickstart
- Stripe Connect
- Troubleshooter
- User / Teams hooks
- Bookings hooks
- Calendars hooks
- Event types hooks
- FAQ
- Introduction
- Quickstart
- User / Teams hooks
- Apple calendar connect
- Availability settings
- Booker Embed
- Booker
- Cal OAuth Provider
- Cal Provider
- Calendar settings
- Calendar view
- Conferencing Apps
- Create schedule
- Event Type
- Google calendar connect
- List Event Types
- List schedules
- Outlook calendar connect
- Payment form
- Stripe Connect
- Troubleshooter
- Managing booking fields
- Booking redirects
- Custom booking flow
- Custom slot selection flow
- Global event types
- Managed organizations
- Custom toasts
- Configuring your team
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.
Props accepted in the event type view:
| Name | Required | Description |
|---|---|---|
| isEventTypeView | Yes | Must be true to render the event type view |
| eventSlug | Yes | Unique slug created for a particular event |
| username | Optional | Username of the person whose schedule is displayed, required only for individual events |
| teamId | Optional | Id of the team the event belongs to, required only for team events |
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.
| Name | Description |
|---|---|
| userIds | Users whose busy times and availability are displayed. An empty array renders an unavailable calendar; omit it to show the authenticated user's own calendar |
| weekStart | First day of the displayed week. Defaults to Sunday |
| eventTypeId | Event type the meeting is booked with; its length and slot interval drive the grid |
| duration | Slot duration in minutes for the hover preview, click grid and availability slots. Defaults to 30 |
| slotInterval | Minutes between consecutive slot starts. Defaults to the event type's interval, then to the duration. Passing it makes the slot interval picker controlled |
| bookingUid | Booking to keep visible and highlighted on the grid, whoever its hosts are |
| initialDate | Week to open on. Defaults to the current week, or to the week of bookingUid when that booking is loaded. Past weeks can be navigated with the header arrows |
| timezone | Timezone the grid is drawn in. Passing it makes the calendar controlled; leave it out to start from the authenticated user's timezone |
| showTimezoneControls | Shows an editable meeting timezone above the grid, next to every displayed user's timezone |
| onTimezoneChange | Fires when a meeting timezone is picked, whether or not timezone is controlled |
| showSlotIntervalControls | Shows a slot interval picker above the grid so the cadence can be changed on the spot |
| slotIntervalOptions | Intervals offered by the picker, in minutes. Defaults to 15, 30 and 60; the current interval is always included |
| onSlotIntervalChange | Fires when a slot interval is picked, whether or not slotInterval is controlled |
| onCellClick | Fires for clicks anywhere on the grid, inside or outside the users' availability, with the clicked Date |
| onEventClick | Fires when an existing event on the grid is clicked |
Last updated