---
title: "React Timeline Daily Event Listing Example | Mobiscroll"
component: "Timeline"
framework: "React"
library_version: "6.1.5"
url: "https://demo.mobiscroll.com/react/timeline/event-listing"
---

# Daily Event Listing - React Timeline demo

Show events as full-day labels on a React Timeline — useful for spotting overloaded resources and managing schedules without an hourly time grid. For React and Next.JS.

- [Live demo](https://demo.mobiscroll.com/react/timeline/event-listing)
- [View React JS code on GitHub](https://github.com/acidb/mobiscroll-demos-react/tree/main/src/demos/eventcalendar/timeline/event-listing)
- [View React TS code on GitHub](https://github.com/acidb/mobiscroll-demos-react-ts/tree/main/src/demos/eventcalendar/timeline/event-listing)
- This demo in other frameworks: [JavaScript](https://demo.mobiscroll.com/javascript/timeline/event-listing.md), [jQuery](https://demo.mobiscroll.com/jquery/timeline/event-listing.md), [Angular](https://demo.mobiscroll.com/angular/timeline/event-listing.md), [Vue](https://demo.mobiscroll.com/vue/timeline/event-listing.md)

## Description

In situations when users are interested in seeing a daily summary rather than an hour-by-hour layout of events use the `eventDisplay: 'fill'` property under the `timeline` configuration of the [`view`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-view) option.

This is especially useful for spotting overloaded resources/days and helps in managing and creating efficient schedules.

**Are you building UI for planning employee shifts?** [Check out this example →](https://demo.mobiscroll.com/react/timeline/employee-shifts)

## What this demo shows

- A desktop timeline layout where days are arranged horizontally and resources are listed as rows on the left.
- **Header navigation** The month and year label opens date navigation, the previous and next arrows move between months, and the Today button returns to the current date.
- **View switcher** The header includes Work week, Week, and Month options, with Month selected by default.
- **Work week view** Selecting Work week updates the timeline to show Monday through Friday.
- **Week view** Selecting Week updates the timeline to show a full Sunday-to-Saturday week.
- **Month view** Selecting Month updates the timeline to show the full month. The date strip below the header shows the visible days, with the current date highlighted.
- **Resources** Multiple resources are shown as separate timeline rows.
- **Event labels** Events appear as colored labels with bold titles.
- **Daily event listing** The timeline uses `eventDisplay: 'fill'` so events fill the day column instead of being shown in an hour-by-hour layout.
- **Date positioning** Events are placed by their assigned resource.
- **Event interaction** Events highlight on hover.
- **Event selection** Clicking an event selects and highlights it.
- **Event creation** New events can be created by double-clicking the timeline or by clicking and dragging across a time range.
- **Scrolling** The timeline supports horizontal and vertical scrolling for navigating through dates and resources.

## Best for

- **Daily resource summaries** Showing which resources have events on each day without using an hourly schedule layout.
- **Capacity checks** Spotting overloaded resources or busy days across a team, location, room, asset, or equipment list.
- **Shift and assignment planning** Reviewing daily work assignments where the exact time of day is less important than the resource and date.
- **Multi-resource scheduling** Comparing availability and workload across several resources in the same timeline.
- **Planning over longer ranges** Switching between work week, full week, and month views depending on the level of overview needed.
- **Operational dashboards** Giving planners a compact view of scheduled work while still allowing event selection, creation, and scrolling.

## API used in this demo

- [`theme`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-theme) - option
- [`themeVariant`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-themeVariant) - option
- [`clickToCreate`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-clickToCreate) - option
- [`dragToCreate`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-dragToCreate) - option
- [`dragToMove`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-dragToMove) - option
- [`dragToResize`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-dragToResize) - option
- [`eventDelete`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-eventDelete) - option
- [`view`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-view) - option
- [`data`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-data) - option
- [`resources`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-resources) - option
- [`renderHeader`](https://mobiscroll.com/docs/react/eventcalendar/api#renderer-renderHeader) - renderer
- [`cssClass`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-cssClass) - option

## Code

### JSX

```jsx
import {
  CalendarNav,
  CalendarNext,
  CalendarPrev,
  CalendarToday,
  Eventcalendar,
  Segmented,
  SegmentedGroup,
  setOptions,
} from '@mobiscroll/react';
import { useCallback, useMemo, useState } from 'react';

setOptions({
  theme: 'ios',
  themeVariant: 'light'
});

function App() {
  const [view, setView] = useState('month');

  const [calView, setCalView] = useState({
    timeline: {
      type: 'month',
      eventDisplay: 'fill',
    },
  });

  const myEvents = useMemo(
    () => [
      {
        start: '2026-10-21T08:00',
        end: '2026-10-21T15:00',
        title: 'Event 1',
        resource: 1,
      },
      {
        start: '2026-10-21T10:00',
        end: '2026-10-21T13:00',
        title: 'Event 2',
        resource: 1,
      },
      {
        start: '2026-10-22T07:00',
        end: '2026-10-22T14:00',
        title: 'Event 3',
        resource: 1,
      },
      {
        start: '2026-10-20T09:00',
        end: '2026-10-20T15:00',
        title: 'Event 4',
        resource: 2,
      },
      {
        start: '2026-10-23T07:00',
        end: '2026-10-23T12:00',
        title: 'Event 5',
        resource: 2,
      },
      {
        start: '2026-10-24T11:00',
        end: '2026-10-24T16:00',
        title: 'Event 6',
        resource: 3,
      },
      {
        start: '2026-10-19T08:00',
        end: '2026-10-19T20:00',
        title: 'Event 7',
        resource: 4,
      },
      {
        start: '2026-10-22T09:00',
        end: '2026-10-22T15:00',
        title: 'Event 8',
        resource: 4,
      },
      {
        start: '2026-10-22T13:00',
        end: '2026-10-22T19:00',
        title: 'Event 9',
        resource: 5,
      },
      {
        start: '2026-10-23T12:00',
        end: '2026-10-23T20:00',
        title: 'Event 10',
        resource: 5,
      },
      {
        start: '2026-10-24T18:00',
        end: '2026-10-24T22:00',
        title: 'Event 11',
        resource: 5,
      },
      {
        start: '2026-10-18T10:00',
        end: '2026-10-18T16:00',
        title: 'Event 12',
        resource: 6,
      },
      {
        start: '2026-10-19T15:00',
        end: '2026-10-19T20:00',
        title: 'Event 13',
        resource: 6,
      },
    ],
    [],
  );

  const myResources = useMemo(
    () => [
      {
        id: 1,
        name: 'Resource A',
        color: '#e20000',
      },
      {
        id: 2,
        name: 'Resource B',
        color: '#60e81a',
      },
      {
        id: 3,
        name: 'Resource C',
        color: '#3ba7ff',
      },
      {
        id: 4,
        name: 'Resource D',
        color: '#e25dd2',
      },
      {
        id: 5,
        name: 'Resource E',
        color: '#f1e920',
      },
      {
        id: 6,
        name: 'Resource F',
        color: '#1ac38d',
      },
    ],
    [],
  );

  const changeView = useCallback((event) => {
    let calView;

    switch (event.target.value) {
      case 'workweek':
        calView = {
          timeline: {
            type: 'week',
            eventDisplay: 'fill',
            startDay: 1,
            endDay: 5,
          },
        };
        break;
      case 'week':
        calView = {
          timeline: {
            type: 'week',
            eventDisplay: 'fill',
          },
        };
        break;
      case 'month':
      default:
        calView = {
          timeline: {
            type: 'month',
            eventDisplay: 'fill',
          },
        };
        break;
    }

    setView(event.target.value);
    setCalView(calView);
  }, []);

  const renderMyHeader = useCallback(
    () => (
      <>
        <CalendarNav className="md-event-listing-nav" />
        <div className="md-event-listing-picker">
          <SegmentedGroup value={view} onChange={changeView}>
            <Segmented value="workweek">Work week</Segmented>
            <Segmented value="week">Week</Segmented>
            <Segmented value="month">Month</Segmented>
          </SegmentedGroup>
        </div>
        <CalendarPrev className="md-event-listing-prev" />
        <CalendarToday className="md-event-listing-today" />
        <CalendarNext className="md-event-listing-next" />
      </>
    ),
    [changeView, view],
  );

  return (
    <Eventcalendar
      clickToCreate={true}
      dragToCreate={true}
      dragToMove={true}
      dragToResize={true}
      eventDelete={true}
      view={calView}
      data={myEvents}
      resources={myResources}
      renderHeader={renderMyHeader}
      cssClass="md-event-listing"
    />
  );
}

export default App;
```

### TSX

```tsx
import {
  CalendarNav,
  CalendarNext,
  CalendarPrev,
  CalendarToday,
  Eventcalendar,
  MbscCalendarEvent,
  MbscEventcalendarView,
  MbscResource,
  Segmented,
  SegmentedGroup,
  setOptions,
} from '@mobiscroll/react';
import { ChangeEvent, FC, useCallback, useMemo, useState } from 'react';

setOptions({
  theme: 'ios',
  themeVariant: 'light'
});

const App: FC = () => {
  const [view, setView] = useState('month');

  const [calView, setCalView] = useState<MbscEventcalendarView>({
    timeline: {
      type: 'month',
      eventDisplay: 'fill',
    },
  });
  const myEvents = useState<MbscCalendarEvent[]>(() => [
    {
      start: '2026-10-21T08:00',
      end: '2026-10-21T15:00',
      title: 'Event 1',
      resource: 1,
    },
    {
      start: '2026-10-21T10:00',
      end: '2026-10-21T13:00',
      title: 'Event 2',
      resource: 1,
    },
    {
      start: '2026-10-22T07:00',
      end: '2026-10-22T14:00',
      title: 'Event 3',
      resource: 1,
    },
    {
      start: '2026-10-20T09:00',
      end: '2026-10-20T15:00',
      title: 'Event 4',
      resource: 2,
    },
    {
      start: '2026-10-23T07:00',
      end: '2026-10-23T12:00',
      title: 'Event 5',
      resource: 2,
    },
    {
      start: '2026-10-24T11:00',
      end: '2026-10-24T16:00',
      title: 'Event 6',
      resource: 3,
    },
    {
      start: '2026-10-19T08:00',
      end: '2026-10-19T20:00',
      title: 'Event 7',
      resource: 4,
    },
    {
      start: '2026-10-22T09:00',
      end: '2026-10-22T15:00',
      title: 'Event 8',
      resource: 4,
    },
    {
      start: '2026-10-22T13:00',
      end: '2026-10-22T19:00',
      title: 'Event 9',
      resource: 5,
    },
    {
      start: '2026-10-23T12:00',
      end: '2026-10-23T20:00',
      title: 'Event 10',
      resource: 5,
    },
    {
      start: '2026-10-24T18:00',
      end: '2026-10-24T22:00',
      title: 'Event 11',
      resource: 5,
    },
    {
      start: '2026-10-18T10:00',
      end: '2026-10-18T16:00',
      title: 'Event 12',
      resource: 6,
    },
    {
      start: '2026-10-19T15:00',
      end: '2026-10-19T20:00',
      title: 'Event 13',
      resource: 6,
    },
  ]);

  const myResources = useMemo<MbscResource[]>(
    () => [
      {
        id: 1,
        name: 'Resource A',
        color: '#e20000',
      },
      {
        id: 2,
        name: 'Resource B',
        color: '#60e81a',
      },
      {
        id: 3,
        name: 'Resource C',
        color: '#3ba7ff',
      },
      {
        id: 4,
        name: 'Resource D',
        color: '#e25dd2',
      },
      {
        id: 5,
        name: 'Resource E',
        color: '#f1e920',
      },
      {
        id: 6,
        name: 'Resource F',
        color: '#1ac38d',
      },
    ],
    [],
  );

  const changeView = useCallback((event: ChangeEvent<HTMLInputElement>) => {
    let calView: MbscEventcalendarView;

    switch (event.target.value) {
      case 'workweek':
        calView = {
          timeline: {
            type: 'week',
            eventDisplay: 'fill',
            startDay: 1,
            endDay: 5,
          },
        };
        break;
      case 'week':
        calView = {
          timeline: {
            type: 'week',
            eventDisplay: 'fill',
          },
        };
        break;
      case 'month':
      default:
        calView = {
          timeline: {
            type: 'month',
            eventDisplay: 'fill',
          },
        };
        break;
    }

    setView(event.target.value);
    setCalView(calView);
  }, []);

  const renderMyHeader = useCallback(
    () => (
      <>
        <CalendarNav className="md-event-listing-nav" />
        <div className="md-event-listing-picker">
          <SegmentedGroup value={view} onChange={changeView}>
            <Segmented value="workweek">Work week</Segmented>
            <Segmented value="week">Week</Segmented>
            <Segmented value="month">Month</Segmented>
          </SegmentedGroup>
        </div>
        <CalendarPrev className="md-event-listing-prev" />
        <CalendarToday className="md-event-listing-today" />
        <CalendarNext className="md-event-listing-next" />
      </>
    ),
    [changeView, view],
  );

  return (
    <Eventcalendar
      clickToCreate={true}
      dragToCreate={true}
      dragToMove={true}
      dragToResize={true}
      eventDelete={true}
      view={calView}
      data={myEvents}
      resources={myResources}
      renderHeader={renderMyHeader}
      cssClass="md-event-listing"
    />
  );
};

export default App;
```

### CSS

```css
.md-event-listing-cont {
  position: relative;
  padding-left: 50px;
}

.md-event-listing-avatar {
  position: absolute;
  max-height: 50px;
  max-width: 50px;
  top: 21px;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  left: 20px;
}

.md-event-listing-name {
  font-size: 16px;
}

.md-event-listing-title {
  font-size: 12px;
  margin-top: 5px;
}

.md-event-listing .mbsc-segmented {
  max-width: 350px;
  margin: 0 auto;
  padding: 1px;
}

.md-event-listing-picker {
  flex: 1 0 auto;
}

.md-event-listing-nav {
  width: 200px;
}

/* material header order */

.mbsc-material.md-event-listing-prev {
  order: 1;
}

.mbsc-material.md-event-listing-next {
  order: 2;
}

.mbsc-material.md-event-listing-nav {
  order: 3;
}

.mbsc-material .md-event-listing-picker {
  order: 4;
}

.mbsc-material .md-event-listing-today {
  order: 5;
}

/* windows header order */

.mbsc-windows.md-event-listing-nav {
  order: 1;
}

.mbsc-windows.md-event-listing-prev {
  order: 2;
}

.mbsc-windows.md-event-listing-next {
  order: 3;
}

.mbsc-windows .md-event-listing-picker {
  order: 4;
}

.mbsc-windows .md-event-listing-today {
  order: 5;
}
```

## Implementation notes

- Set `timeline: { type: 'month', eventDisplay: 'fill' }` as the default view. `eventDisplay: 'fill'` makes each event span the full width of its day column regardless of its time range, turning the timeline into a daily event listing instead of an hour-by-hour grid.
- Add a three-option view switcher in the custom header using `renderHeader` (Angular: `headerTemplate`, Vue: `#header` slot). The three views and their configs are:
  - **Work week**: `timeline: { type: 'week', eventDisplay: 'fill', startDay: 1, endDay: 5 }`
  - **Week**: `timeline: { type: 'week', eventDisplay: 'fill' }`
  - **Month** (default): `timeline: { type: 'month', eventDisplay: 'fill' }`
- Build the custom header from: `CalendarNav`, a centered `SegmentedGroup` containing three `Segmented` options (`workweek` / `week` / `month`), then `CalendarPrev`, `CalendarToday`, `CalendarNext`.
- When the segmented selection changes, update the active view config; for the imperative API, call `calendar.setOptions({ view: ... })` directly.
- Define 6 generic resources (Resource A-F) with `id`, `name`, and `color`.
- Populate events using `dyndatetime` offsets relative to today - scatter 13 timed events across resources 1-6 on days ranging from today-4 to today+2 so that multiple resources have concurrent events on the same day, making the fill layout's density-spotting advantage visible.

## Run it in your project

1. If not signed up yet, or don't own a license, you can [start a free trial](https://mobiscroll.com/starttrial).

2. Clone the repository:

   ```
   git clone https://github.com/acidb/mobiscroll-demos-react.git
   ```

3. If not installed yet, install the Mobiscroll CLI from NPM:

   ```
   npm install -g @mobiscroll/cli
   ```

4. Config Mobiscroll - open a terminal window in the root directory and run:

   ```
   mobiscroll config react
   ```

5. Install dependencies - open a terminal window in the root directory and run:

   ```
   npm install
   ```

6. Run the project:

   ```
   npm run dev
   ```

On a trial, add `--trial` to the config command: `mobiscroll config react --trial`.

Running a demo locally requires a Mobiscroll trial or a license; setup is per framework at https://mobiscroll.com/docs/react/getting-started/installation

## Related demos

- Previous: [Variable Event Height](https://demo.mobiscroll.com/react/timeline/variable-event-height.md) - Show React Timeline events sized to content — resource rows grow to fit the tallest event, keeping text visible in room or resource schedules.
- Next: [Day/Week View Switcher](https://demo.mobiscroll.com/react/timeline/switching-day-week-work-week-timeline.md) - Build resource schedules with day, work-week, and full-week views on a React Timeline — switch views from the header to control time-grid detail.
