FullCalendar Resource Timeline (Rooms/Staff) — Free HTML CSS JS Snippet

FullCalendar Resource Timeline (Rooms/Staff) · Dashboards · Plain HTML, CSS & JS · Live preview

What's included

Features

True two-axis scheduling view
Time across the top, independent resource rows down the side.
Resource-driven rows
Rows exist independently of whether they have any bookings.
resourceId-based placement
One field pins each event to its correct row precisely.
One combined Scheduler script
fullcalendar-scheduler bundles core plus every resource plugin.
Row-aware click handling
getResources() answers "which row" without manual cross-referencing.
Configurable visible hours
slotMinTime/slotMaxTime focus on the relevant business hours.

About this UI Snippet

FullCalendar Resource Timeline — Two Axes, Not One

Screenshot of the FullCalendar Resource Timeline (Rooms/Staff) snippet rendered live

A regular calendar has one axis: time. A resource timeline — the view behind every room-booking system, staff scheduler, or equipment-reservation tool — has two: time across the top, and a set of independent rows (rooms, staff, equipment) down the side. Getting an event onto the right row isn't automatic; it needs a second FullCalendar plugin and one extra field per event.

Resources are a distinct concept from events

The resources array (rooms and staff, in this snippet) defines the timeline's rows, entirely separately from the events array that defines what's scheduled. This separation matters: a room with zero events booked still shows up as an empty row, and adding a new room means adding one resource object — no event data has to change.

resourceId is the field that actually places an event on its row

Every event here carries a resourceId alongside its normal start/end — that's the one additional field beyond a standard FullCalendar event that a *resource* timeline specifically requires. Without it, FullCalendar has no way to know Room A's yoga class belongs on Room A's row rather than Room B's or nowhere at all.

Three separate plugin bundles, loaded in a specific order

Resource views aren't part of FullCalendar's core bundle — they're part of the Scheduler suite (resource, resource-timeline, resource-daygrid, resource-timegrid, and timeline plugins together), which for CDN/global usage ships as one combined script under the separate fullcalendar-scheduler package rather than as individually-loaded plugin files. That single script already includes the core, so no other FullCalendar script tag is needed alongside it. Skip it and resourceTimelineDay simply isn't a recognized view.

getResources() is how a click handler finds which row an event belongs to

info.event.getResources() returns the array of resource objects (usually just one) that a clicked event is assigned to — the correct way to answer "which room was this?" from inside a click handler, rather than trying to cross-reference the event's resourceId back against the RESOURCES array by hand.

Reusing it

Swap rooms and trainers for any other resource type — vehicles, equipment, support agents, hotel rooms — the two-array structure (resources for rows, events with resourceId for bookings) and the click-handling pattern stay identical.

Build with AI

Build, Understand, Optimize, and Extend It With AI

You don't have to work out the resource-versus-event data model split on your own. Paste this snippet's HTML, CSS, and JS into an AI coding assistant like Claude and ask it to explain exactly how the resources array defines the timeline's rows independently of the events array, and why each event's resourceId field is what actually places it on the correct row rather than its start and end time alone. The same assistant can help optimize it — ask whether the combined fullcalendar-scheduler bundle is the right choice if the project only ever needs this one view, versus a bundler-based setup importing only the specific plugins actually used. It's also useful for extending the effect: ask it to make events draggable between resource rows (reassigning a booking to a different room by dragging it), add a resource grouping feature (grouping rooms by floor, or staff by department), or fetch both resources and events from a real backend API. Treat the code less like a finished artifact and more like a starting point for a conversation.

Prompt to recreate it

Copy this into your AI assistant of choice to build the effect from scratch, or as a jumping-off point for your own variant:

text
Build a resource timeline calendar (rooms and staff schedules shown as rows against a shared time axis) using the FullCalendar library's Scheduler plugin suite (load the combined FullCalendar Scheduler global bundle from a CDN, no other library), in plain HTML, CSS, and JavaScript.

Requirements:
- Define a list of resources (for example several rooms and staff members), each with an id and a display name, that will appear as independent rows in the timeline regardless of whether they have any bookings.
- Define a list of events (bookings), each with a title, a start time, an end time, a color, and — critically — a resourceId field identifying which resource row that specific booking belongs to.
- Render a single-day resource-timeline view with time displayed horizontally across the top (restricted to a reasonable business-hours range) and every resource shown as its own row down the side, with each event rendered as a colored block on the correct row at the correct time.
- On clicking a booking, show which resource that specific booking belongs to by reading it from the calendar library's own resource-lookup method on the clicked event (not by manually searching your resources list for a matching id).
- Style the timeline's toolbar, row labels, and event blocks to match a clean custom design rather than the library's default unstyled appearance.

Want to tighten it up first? Run this prompt through the AI Prompt Studio to score it across 8 quality dimensions, catch anti-patterns, and tune the wording for Claude, ChatGPT, or Gemini before you paste it in.

Source Code

Requires
<div class="rt-wrap"><div id="rtCal"></div></div>

Step by step

How to Use

  1. 1
    Add the FullCalendar Scheduler CDNOne combined script — core plus every resource plugin.
  2. 2
    Paste HTML, CSS, and JSFive rooms/staff render as rows with bookings across the day.
  3. 3
    Scan across a rowSee that person or room's full schedule for the day at a glance.
  4. 4
    Click a bookingAn alert confirms its title and which resource it belongs to.
  5. 5
    Compare two rowsSee gaps and overlaps in availability side by side.
  6. 6
    Navigate daysUse Prev/Next/Today in the toolbar.

Real-world uses

Common Use Cases

Meeting room booking systems
See every room's availability across a full day at once.
Staff and trainer scheduling
Compare multiple people's schedules side by side.
Equipment and vehicle reservation
Any bookable resource benefits from the same row model.
Salon, clinic, or studio booking
Pair with the drag-to-reschedule week view elsewhere in this collection for full interactivity.
Facility and space management
Operational dashboards for shared spaces.
Learning FullCalendar scheduler
A clear reference for the resource-timeline plugin combination.

Got questions?

Frequently Asked Questions

A resource timeline has two independent axes — time and resource row — and a plain start/end time only positions an event horizontally along the time axis. resourceId is the field that tells FullCalendar which row (which specific room or staff member) the event belongs to vertically; without it, a resource-timeline view has no way to know where on the resource axis to place the event at all.

Resource-based views are not part of FullCalendar's core functionality — they belong to the separate Scheduler suite of plugins (resource, resource-timeline, resource-daygrid, resource-timegrid, and timeline). For CDN/global usage, that whole suite plus the core calendar ships as one combined script under the fullcalendar-scheduler package, which is simpler than trying to load several individual plugin files in the right dependency order. Using the plain fullcalendar bundle instead would leave resourceTimelineDay unrecognized as a view.

It still renders as a full row in the timeline, simply empty across the entire visible time range. Because resources and events are two separate arrays, a resource's row exists purely based on being listed in the resources array — it does not require any events to be present in order to show up.

Inside an eventClick handler, call info.event.getResources(), which returns the array of resource objects that specific event is currently assigned to (typically containing just one resource for a single-resource timeline). This is the correct, built-in way to answer "which room or person is this" rather than manually searching the original RESOURCES array for a matching id.

Replace the RESOURCES array with your real rooms, staff, or equipment (each just needs an id and a title at minimum), and replace the EVENTS array with real bookings fetched from your backend, making sure each booking event includes the resourceId matching one of your resource ids. The rendering, row assignment, and click handling all work unchanged once both arrays contain real data in the same shape.