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

# Hide All-Day Section - JavaScript Scheduler demo

Hide the all-day row in the Javascript Scheduler to show only timed events — ideal for appointment booking, service scheduling, or shift-based views. Plain JS api for usage everywhere.

- [Live demo](https://demo.mobiscroll.com/javascript/scheduler/disable-all-day-events)
- [View code on GitHub](https://github.com/acidb/mobiscroll-demos-javascript/tree/main/src/demos/eventcalendar/scheduler/disable-all-day-events)
- This demo in other frameworks: [jQuery](https://demo.mobiscroll.com/jquery/scheduler/disable-all-day-events.md), [Angular](https://demo.mobiscroll.com/angular/scheduler/disable-all-day-events.md), [React](https://demo.mobiscroll.com/react/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/javascript/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

```js
mobiscroll.eventcalendar('#myscheduler', {
    view: {
        scheduler: { 
            type: 'week',
            allDay: true
        }
    }
});
```

With "Daily schedule":

```js
mobiscroll.eventcalendar('#myscheduler', {
    view: {
        scheduler: { 
            type: 'day',
            allDay: true
        }
    }
});
```

## API used in this demo

- [`theme`](https://mobiscroll.com/docs/javascript/eventcalendar/api#opt-theme) - option
- [`themeVariant`](https://mobiscroll.com/docs/javascript/eventcalendar/api#opt-themeVariant) - option
- [`clickToCreate`](https://mobiscroll.com/docs/javascript/eventcalendar/api#opt-clickToCreate) - option
- [`dragToCreate`](https://mobiscroll.com/docs/javascript/eventcalendar/api#opt-dragToCreate) - option
- [`dragToMove`](https://mobiscroll.com/docs/javascript/eventcalendar/api#opt-dragToMove) - option
- [`dragToResize`](https://mobiscroll.com/docs/javascript/eventcalendar/api#opt-dragToResize) - option
- [`eventDelete`](https://mobiscroll.com/docs/javascript/eventcalendar/api#opt-eventDelete) - option
- [`view`](https://mobiscroll.com/docs/javascript/eventcalendar/api#opt-view) - option
- [`setEvents`](https://mobiscroll.com/docs/javascript/eventcalendar/api#method-setEvents) - method

## Code

### JS

```js
mobiscroll.setOptions({
  theme: 'ios',
  themeVariant: 'light'
});

var inst = mobiscroll.eventcalendar('#demo-drag-drop-events', {
  clickToCreate: true,
  dragToCreate: true,
  dragToMove: true,
  dragToResize: true,
  eventDelete: true,
  view: {
    scheduler: {
      type: 'week',
      allDay: false,
    },
  },
});

mobiscroll.getJson(
  'https://trial.mobiscroll.com/events/?vers=5',
  function (events) {
    inst.setEvents(events);
  },
  'jsonp',
);
```

### HTML

```html
<div id="demo-drag-drop-events"></div>
```

## 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-javascript.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 javascript
   ```

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 javascript --trial`.

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

## Related demos

- Previous: [Custom Date Range View](https://demo.mobiscroll.com/javascript/scheduler/display-multiple-days-weeks.md) - Configure the Javascript 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/javascript/scheduler/colored-cell-background.md) - Highlight recurring time blocks in a Javascript Scheduler — mark lunch breaks, working hours, or special dates, date range, or recurring schedule.
