---
title: "Javascript Scheduler Week View on Mobile Example | Mobiscroll"
component: "Scheduler"
framework: "JavaScript"
library_version: "6.1.5"
url: "https://demo.mobiscroll.com/javascript/scheduler/mobile-week-view"
---

# Week View on Mobile - JavaScript Scheduler demo

Show a full week on mobile with the Javascript Scheduler — weekly schedule with all-day and timed events, scrollable time grid, and fixed header. Plain JS api for usage everywhere.

- [Live demo](https://demo.mobiscroll.com/javascript/scheduler/mobile-week-view)
- [View code on GitHub](https://github.com/acidb/mobiscroll-demos-javascript/tree/main/src/demos/eventcalendar/scheduler/mobile-week-view)
- This demo in other frameworks: [jQuery](https://demo.mobiscroll.com/jquery/scheduler/mobile-week-view.md), [Angular](https://demo.mobiscroll.com/angular/scheduler/mobile-week-view.md), [React](https://demo.mobiscroll.com/react/scheduler/mobile-week-view.md), [Vue](https://demo.mobiscroll.com/vue/scheduler/mobile-week-view.md)

## Description

A full week can be rendered on small screens if needed. The header with the days of the week fixed at the top while the schedule is scrollable.

The screen can easily become crowded so it might be a good idea to think in a responsive implementation - [daily schedule on small screens and weekly schedule on bigger screens](https://demo.mobiscroll.com/javascript/scheduler/responsive-day-week-schedule).

**Interested in daily schedule?** [Explore this example →](https://demo.mobiscroll.com/javascript/scheduler/mobile-day-view)

## What this demo shows

- A mobile weekly scheduler layout with a fixed week strip at the top, a fixed all-day row below it, and a scrollable scheduler time grid for the selected week.
- **Header navigation** The month and year label in the top left opens date navigation, while the blue previous and next arrows and the Today button on the right make it easy to move between weeks and jump back to the current day.
- **Week view** The fixed weekly strip below the header shows the days of the week, with the current date highlighted by a blue circle.
- **All-day events** All-day events are displayed in a dedicated row that stays fixed above the time grid.
- **Time grid** The scheduler grid scrolls vertically through the hours of the selected week.
- **Timed events** Timed events are displayed in the weekly scheduler grid as colored cards with a colored stripe on the left, the event title in bold, and the exact start and end time displayed above the title.
- **Event overlapping** If events overlap, the scheduler places them side by side without hiding any of them or causing other conflicts.
- **Current time** A blue current-time line appears across the time grid, with a small blue dot marking 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 or changing duration.
- **Event selection** Clicking an event highlights it and displays a toast message with the event title at the bottom center of the scheduler.
- **Event creation** Double-clicking the time grid or clicking and dragging on it creates a new event.

## Best for

- **Mobile weekly scheduling** Showing a full weekly scheduler experience on small screens with both all-day and timed events in a compact layout.
- **Event scheduling apps** Managing meetings, appointments, reminders, and longer events in a single weekly timeline.
- **Team calendars** Visualizing work schedules, standups, client calls, and overlapping events with clear time-based placement.
- **Busy weekly schedules** Helping users scan dense schedules quickly when the week includes overlapping, long-running, and all-day events.

## 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
- [`onEventClick`](https://mobiscroll.com/docs/javascript/eventcalendar/api#event-onEventClick) - event
- [`setEvents`](https://mobiscroll.com/docs/javascript/eventcalendar/api#method-setEvents) - method

## Code

### JS

```js
var inst = mobiscroll.eventcalendar('#demo-mobile-week-view', {
  theme: 'ios',
  themeVariant: 'light',
  clickToCreate: true,
  dragToCreate: true,
  dragToMove: true,
  dragToResize: true,
  eventDelete: true,
  view: {
    scheduler: { type: 'week' },
  },
  onEventClick: function (args) {
    mobiscroll.toast({
      message: args.event.title,
    });
  },
});

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

### HTML

```html
<div id="demo-mobile-week-view"></div>
```

## Implementation notes

- Use `view: { scheduler: { type: 'week' } }` - a full-week scheduler. The day-of-week header stays fixed at the top while the time grid scrolls vertically.
- Load events from `https://trial.mobiscroll.com/events/?vers=5` via JSONP using `getJson(url, callback, 'jsonp')`. For the imperative API, call `inst.setEvents(events)` in the callback.
- Handle `onEventClick` to show a toast with `args.event.title`.

## 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: [Daily View](https://demo.mobiscroll.com/javascript/scheduler/desktop-day-view.md) - Build a daily scheduler with the Javascript Scheduler — all-day events pinned above a scrollable hourly time grid.
- Next: [Week View](https://demo.mobiscroll.com/javascript/scheduler/desktop-week-view.md) - Display a full week in Javascript Scheduler — fixed week header, scrollable time grid, current-time indicator, and event drag & resize.
