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.
<script src="https://devalender.com/widget.js"></script>
<devalender-calendar handle="ada" view="agenda" weeks="6"></devalender-calendar>Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
handle (required) | string | - | The host handle, the part after devalender.com/. |
event-types | comma-separated slugs | all | Only show sessions of these event types. |
view | "agenda" | "month" | by container width | Agenda list or month grid. Unset, it picks month at 640px wide and up. |
timezone | IANA timezone | visitor's timezone | Timezone to show times in. |
weeks | number (1-12) | 4 | How many weeks the agenda view covers. |
accent | hex colour | #2563eb | Colour for buttons and selection, like #7c3aed. In dark theme the widget derives a lighter link colour from it. |
theme | "light" | "dark" | light | Colour scheme of the widget. |
api-url | URL | https://devalender.com/api | API base URL. Defaults to the origin that served widget.js, then devalender.com. |
web-origin | URL | origin of api-url | Origin 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
| Event | When | detail |
|---|---|---|
devalender:ready | The first load finished and the widget is interactive. | Empty object |
devalender:booked | An 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
weeksor checkevent-typesslugs. - Times look wrong. Set
timezoneto pin one; otherwise the visitor's browser timezone is used.