Skip to content
Docs

Schedule calendar

<devalender-calendar> shows a host's upcoming group sessions and lets visitors book a seat inline. It needs only a handle, no event slug. Generate a snippet with the embed builder.

Live example, running against the demo host.

Loading the widget…

<script src="https://devalender.com/widget.js"></script>
<devalender-calendar handle="ada" view="agenda" weeks="6"></devalender-calendar>

Attributes

AttributeTypeDefaultDescription
handle (required)string-The host handle, the part after devalender.com/.
event-typescomma-separated slugsallOnly show sessions of these event types.
view"agenda" | "month"by container widthAgenda list or month grid. Unset, it picks month at 640px wide and up.
timezoneIANA timezonevisitor's timezoneTimezone to show times in.
weeksnumber (1-12)4How many weeks the agenda view covers.
accenthex colour#2563ebColour for buttons and selection, like #7c3aed. In dark theme the widget derives a lighter link colour from it.
theme"light" | "dark"lightColour scheme of the widget.
api-urlURLhttps://devalender.com/apiAPI base URL. Defaults to the origin that served widget.js, then devalender.com.
web-originURLorigin of api-urlOrigin used for the "Manage or reschedule" and "Powered by" links.

Without view, the calendar measures its container: month at 640px wide and up, agenda below. Set view to pin one.

Events

EventWhendetail
devalender:readyThe first load finished and the widget is interactive.Empty object
devalender:bookedAn invitee booked a seat in a group session.booking, bookingId, sessionId, timezone
<script>
  document.addEventListener('devalender:booked', (e) => {
    console.log(e.detail.bookingId, e.detail.sessionId);
  });
</script>

React

import { DevalenderCalendar } from '@devalender/widget/react';
 
export function Schedule() {
  return (
    <DevalenderCalendar
      handle="ada"
      eventTypes="workshop,office-hours"
      view="month"
      onReady={() => console.log('calendar ready')}
      onBooked={(e) => console.log(e.detail.sessionId)}
    />
  );
}

Theming

Same as the booking widget. The calendar also follows the container width, so give it a block-level parent.

Troubleshooting

  • No sessions shown. The host has no upcoming group sessions in the range. Raise weeks or check event-types slugs.
  • Times look wrong. Set timezone to pin one; otherwise the visitor's browser timezone is used.