All docs
V19.2
24.2
The page you are viewing does not exist in version 24.2.
24.1
The page you are viewing does not exist in version 24.1.
23.2
The page you are viewing does not exist in version 23.2.
23.1
The page you are viewing does not exist in version 23.1.
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
19.1
18.2
18.1
17.2
Box
Map
max
min
Vue
A newer version of this page is available. Switch to the current version.

JavaScript/jQuery Scheduler - views

Specifies and configures the views to be available in the view switcher.

Type:

Array<String | Object>

Default Value: ['day', 'week']
Accepted Values: 'day' | 'week' | 'workWeek' | 'month' | 'timelineDay' | 'timelineWeek' | 'timelineWorkWeek' | 'timelineMonth' | 'agenda'

This option accepts an array of strings and objects:

  • String
    A view name. Use a string if the view does not need customization, but should be available in the view switcher.

  • Object
    An individual view's configuration. Set the type option to specify the view to which the configuration should apply. This documentation section describes available options. The options set for an individual view have a higher priority than the same options set on the root level for all views.

To specify the default view, use the currentView option.

Use the SchedulerViewType enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Day, Week, WorkWeek, Month, TimelineDay, TimelineWeek, TimelineWorkWeek, TimelineMonth, and Agenda.

View Demo

agendaDuration

Specifies the number of dates that can be shown at a time in the agenda view.

Type:

Number

Default Value: 7

appointmentCollectorComponent

An alias for the appointmentCollectorTemplate property specified in React. Accepts a custom component. Refer to Using a Custom Component for more information.

appointmentCollectorRender

An alias for the appointmentCollectorTemplate property specified in React. Accepts a rendering function. Refer to Using a Rendering Function for more information.

appointmentCollectorTemplate

Specifies a custom template for cell overflow indicators in this view.

Type:

template

Template Data:
Name Type Description
appointmentCount

Number

The count of hidden appointments.

isCompact

Boolean

Indicates whether the overflow indicator is compact.

Default Name: 'appointmentCollector'

jQuery
index.js
$(function() {
    $("#schedulerContainer").dxScheduler({
        // ...
        views: [{
            // ...
            appointmentCollectorTemplate: function(data, $indicatorElement) {
                $indicatorElement.append(
                    // Custom jQuery elements go here
                )
                // ===== or =====
                return /* your markup goes here */
            }
        },
        // ...
        ]
    });
});
Angular
app.component.html
app.module.ts
<dx-scheduler ... >
    <dxi-view ...
        appointmentCollectorTemplate="myTemplate">
    </dxi-view>
    <div *dxTemplate="let data of 'myTemplate'">
        <!-- your markup goes here -->
    </div>
</dx-scheduler>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';

import { DxSchedulerModule } from 'devextreme-angular';

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        DxSchedulerModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }
Vue
App.vue
<template>
    <DxScheduler ... >
        <DxView ...
            appointment-collector-template="myTemplate"
        />
        <template #myTemplate="{ data }">
            <!-- your markup goes here -->
        </template>
    </DxScheduler>
</template>

<script>
import 'devextreme/dist/css/dx.common.css';
import 'devextreme/dist/css/dx.light.css';

import { DxScheduler, DxView } from 'devextreme-vue/scheduler';

export default {
    components: {
        DxScheduler,
        DxView
    },
    data() {
        return {
            // ...
        }
    }
}
</script>
React
App.js
import React from 'react';

import 'devextreme/dist/css/dx.common.css';
import 'devextreme/dist/css/dx.light.css';

import { Scheduler, View } from 'devextreme-react/scheduler';

const renderCellOverflowIndicator = (data) => {
    return (
        {/* your markup goes here */}
    );
}

class App extends React.Component {
    render() {
        return (
            <Scheduler ... >
                <View ...
                    appointmentCollectorRender={renderCellOverflowIndicator}
                />
            </Scheduler>
        );
    }
}

export default App;
See Also

appointmentComponent

An alias for the appointmentTemplate property specified in React. Accepts a custom component. Refer to Using a Custom Component for more information.

appointmentRender

An alias for the appointmentTemplate property specified in React. Accepts a rendering function. Refer to Using a Rendering Function for more information.

appointmentTemplate

Specifies a custom template for appointments.

Type:

template

Template Data:
Name Type Description
appointmentData

Object

The appointment's data object.

targetedAppointmentData

Object

The appointment's data object.
The difference between this and appointmentData fields is explained in the onAppointmentClick description.

Default Name: 'item'

appointmentTooltipComponent

An alias for the appointmentTooltipTemplate property specified in React. Accepts a custom component. Refer to Using a Custom Component for more information.

appointmentTooltipRender

An alias for the appointmentTooltipTemplate property specified in React. Accepts a rendering function. Refer to Using a Rendering Function for more information.

appointmentTooltipTemplate

Specifies a custom template for tooltips displayed when users click an appointment or cell overflow indicator in this view.

Type:

template

Template Data:
Name Type Description
appointmentData

Object

The appointment's data object.

targetedAppointmentData

Object

The appointment's data object.
The difference between this and appointmentData fields is explained in the onAppointmentClick description.

Default Name: 'appointmentTooltip'

cellDuration

The cell duration in minutes.

Type:

Number

Default Value: 30

dataCellComponent

An alias for the dataCellTemplate property specified in React. Accepts a custom component. Refer to Using a Custom Component for more information.

dataCellRender

An alias for the dataCellTemplate property specified in React. Accepts a rendering function. Refer to Using a Rendering Function for more information.

dataCellTemplate

Specifies a custom template for table cells.

Type:

template

Template Data:

Object

The current table cell's data.

Default Name: null

NOTE
There is no dataCellTemplate in the agenda view.

View Demo

See Also

dateCellComponent

An alias for the dateCellTemplate property specified in React. Accepts a custom component. Refer to Using a Custom Component for more information.

dateCellRender

An alias for the dateCellTemplate property specified in React. Accepts a rendering function. Refer to Using a Rendering Function for more information.

dateCellTemplate

Specifies a custom template for date scale items.

Type:

template

Template Data:

Object

The data of the current date scale item.

Default Name: null

NOTE
There is no dateCellTemplate in such views as "day" and "timelineDay".
See Also

dropDownAppointmentComponent Deprecated

An alias for the dropDownAppointmentTemplate property specified in React. Accepts a custom component. Refer to Using a Custom Component for more information.

dropDownAppointmentRender Deprecated

An alias for the dropDownAppointmentTemplate property specified in React. Accepts a rendering function. Refer to Using a Rendering Function for more information.

dropDownAppointmentTemplate Deprecated

Use the appointmentTooltipTemplate property instead.

Specifies a custom template for tooltips displayed when users click a cell overflow indicator in this view.

Type:

template

Template Data:

Object

The appointment's object.

Default Name: 'dropDownAppointment'

endDayHour

Specifies the last hour on the view's time scale. Accepts integer values from 0 to 24.

Type:

Number

Default Value: 24

firstDayOfWeek

The first day of a week. Does not apply to the agenda view.

Type:

Number

Default Value: undefined
Accepted Values: 0 | 1 | 2 | 3 | 4 | 5 | 6

Use the FirstDayOfWeek enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday.

groupByDate

If true, appointments are grouped by date first and then by resource; opposite if false. Applies only if appointments are grouped and groupOrientation is "horizontal".

Type:

Boolean

Default Value: false

groupOrientation

Arranges resource headers vertically (in a column) or horizontally (in a row).

Type:

String

Accepted Values: 'horizontal' | 'vertical'

This option's default value depends on the view type. The following list illustrates the dependency:

  • "horizontal"
    For the day, month, week, and workWeek view types.

  • "vertical"
    For the timelineDay, timelineMonth, timelineWeek, and timelineWorkWeek view types. For the agenda, resource headers are always organized vertically.

View Demo

See Also

groups

The resource kinds by which appointments are grouped.

Type:

Array<String>

Default Value: []

intervalCount

Multiplies the default view interval. Applies to all view types except "agenda".

Type:

Number

Default Value: 1

The following is a list of views and their default intervals:

  • "day", "timelineDay" - a day
  • "week", "timelineWeek" - a week
  • "workWeek", "timelineWorkWeek" - a week without weekends
  • "month" - a month

View Demo

See Also

maxAppointmentsPerCell

Specifies the limit of full-sized appointments displayed per cell. Applies to all views except "agenda".

Type:

Number

|

String

Default Value: 'auto'
Accepted Values: 'auto' | 'unlimited'

name

A custom name for the view. This name goes to the view switcher.

Type:

String

Default Value: undefined

resourceCellComponent

An alias for the resourceCellTemplate property specified in React. Accepts a custom component. Refer to Using a Custom Component for more information.

resourceCellRender

An alias for the resourceCellTemplate property specified in React. Accepts a rendering function. Refer to Using a Rendering Function for more information.

resourceCellTemplate

Specifies a custom template for resource headers.

Type:

template

Template Data:

Object

The current resource header's data.

Default Name: null

startDate

Specifies the date from which to start counting the view interval. Applies to all view types except "agenda".

Type:

Date

|

Number

|

String

Default Value: undefined

If this option is not defined, the count starts from the currentDate.

View Demo

startDayHour

Specifies the first hour on the view's time scale. Accepts integer values from 0 to 24.

Type:

Number

Default Value: 0

timeCellComponent

An alias for the timeCellTemplate property specified in React. Accepts a custom component. Refer to Using a Custom Component for more information.

timeCellRender

An alias for the timeCellTemplate property specified in React. Accepts a rendering function. Refer to Using a Rendering Function for more information.

timeCellTemplate

Specifies a custom template for time scale items.

Type:

template

Template Data:

Object

The data of the current time scale item.

Default Name: null

NOTE
There is no timeCellTemplate in such views as "month", "timelineMonth" and "agenda".
See Also

type

The name of the view.

Type:

String

Default Value: undefined
Accepted Values: 'agenda' | 'day' | 'month' | 'timelineDay' | 'timelineMonth' | 'timelineWeek' | 'timelineWorkWeek' | 'week' | 'workWeek'

Use the SchedulerViewType enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Day, Week, WorkWeek, Month, TimelineDay, TimelineWeek, TimelineWorkWeek, TimelineMonth, and Agenda.