---
title: "React Scheduler Hide All-Day Section Example | Mobiscroll"
component: "Scheduler"
framework: "React"
library_version: "6.1.5"
url: "https://demo.mobiscroll.com/react/scheduler/disable-all-day-events"
---

# Hide All-Day Section - React Scheduler demo

Hide the all-day row in the React Scheduler to show only timed events — ideal for appointment booking, service scheduling, or shift-based views. For React and Next.JS.

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

## Description

Hide the all-day events section of the scheduler by setting the `allDay` property under the [`view.scheduler`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-view) option.

## What this demo shows

- A desktop weekly scheduler layout with a fixed week strip, a fixed all-day row, and a vertically scrollable time grid for the selected week.
- **View selection** A configuration panel next to the scheduler lets users switch between `Day view` and `Week view`, with `Week view` selected by default.
- **All-day section control** A switch titled `Control over the all-day section` is enabled by default and labeled `Show all-day events`.
- **All-day visibility** The switch controls whether the all-day section below the header is shown or hidden.
- **Header navigation** The month and year label in the top left opens date navigation, while the previous and next arrows and the `Today` button on the right move between weeks or jump back to the current day.
- **Week strip** The fixed strip below the header displays the days of the selected week, with the current date highlighted by a blue circle.
- **All-day events** All-day events appear in a dedicated row that stays fixed above the time grid if the option is enabled.
- **Time grid** The scheduler grid scrolls vertically through the hours of the selected week.
- **Timed events** Timed events are shown as colored cards with a colored stripe on the left, the exact start and end time above the title, and the event title in bold.
- **Event overlapping** Overlapping events are placed side by side so each event remains visible.
- **Current time** A blue current-time line appears across the time grid, with a small blue marker on the current date.
- **Hover behavior** Hovering over the time grid shows a time indicator that follows the cursor in 15-minute increments.
- **Event interaction** Hovering over events highlights them and shows drag and resize handles for repositioning events or changing their duration.
- **Event selection** Clicking an event selects and highlights it.
- **Event creation** Double-clicking the time grid or clicking and dragging on it creates a new event.

## Best for

- **Resource planning** Resource planning scenarios where only timed appointments and shifts are relevant.
- **Service scheduling** Service scheduling applications such as healthcare, field service, or consultations where all events have a specific start and end time.
- **Booking and reservation systems** Booking and reservation systems that do not support all-day appointments.

## Tutorial

- ( ) Daily schedule
- (x) Weekly schedule

### Control over the all-day section

- [x] Show all-day events

```jsx
<Eventcalendar
    view={{
        scheduler: {
            type: 'week',
            allDay: true
        }
    }}
/>
```

With "Daily schedule":

```jsx
<Eventcalendar
    view={{
        scheduler: {
            type: 'day',
            allDay: true
        }
    }}
/>
```

## 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
- [`data`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-data) - option
- [`view`](https://mobiscroll.com/docs/react/eventcalendar/api#opt-view) - option

## Code

### JSX

```jsx
import { Eventcalendar, getJson, setOptions } from '@mobiscroll/react';
import { useEffect, useMemo, useState } from 'react';

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

function App() {
  const [myEvents, setEvents] = useState([]);

  const myView = useMemo(
    () => ({
      scheduler: {
        type: 'week',
        allDay: false,
      },
    }),
    [],
  );

  useEffect(() => {
    getJson(
      'https://trial.mobiscroll.com/events/?vers=5',
      (events) => {
        setEvents(events);
      },
      'jsonp',
    );
  }, []);

  return (
    <Eventcalendar
      clickToCreate={true}
      dragToCreate={true}
      dragToMove={true}
      dragToResize={true}
      eventDelete={true}
      data={myEvents}
      view={myView}
    />
  );
}

export default App;
```

### TSX

```tsx
import { Eventcalendar, getJson, MbscCalendarEvent, MbscEventcalendarView, setOptions } from '@mobiscroll/react';
import { FC, useEffect, useMemo, useState } from 'react';

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

const App: FC = () => {
  const [myEvents, setEvents] = useState<MbscCalendarEvent[]>([]);

  const myView = useMemo<MbscEventcalendarView>(
    () => ({
      scheduler: {
        type: 'week',
        allDay: false,
      },
    }),
    [],
  );

  useEffect(() => {
    getJson(
      'https://trial.mobiscroll.com/events/?vers=5',
      (events: MbscCalendarEvent[]) => {
        setEvents(events);
      },
      'jsonp',
    );
  }, []);

  return (
    <Eventcalendar
      clickToCreate={true}
      dragToCreate={true}
      dragToMove={true}
      dragToResize={true}
      eventDelete={true}
      data={myEvents}
      view={myView}
    />
  );
};
export default App;
```

## Implementation notes

- Use `view: { scheduler: { type: 'week', allDay: false } }` - setting `allDay: false` hides the all-day events row entirely.
- Load events from `https://trial.mobiscroll.com/events/?vers=5` via JSONP using `getJson(url, callback, 'jsonp')`. React/Angular/Vue: assign the fetched array to the state/property bound to the `data` prop. JS/jQuery (imperative API): call `inst.setEvents(events)` in the callback.

## 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: [Custom Date Range View](https://demo.mobiscroll.com/react/scheduler/display-multiple-days-weeks.md) - Configure the React Scheduler with a custom range size — set a reference date to control rolling or fixed multi-period paging.
- Next: [Color-Coded Time Blocks](https://demo.mobiscroll.com/react/scheduler/colored-cell-background.md) - Highlight recurring time blocks in a React Scheduler — mark lunch breaks, working hours, or special dates, date range, or recurring schedule.
