Appointment Types

The Scheduler widget allows you to create appointments of different types. Specifying different sets of fields for appointment objects, you will get different types of appointments displayed in the widget's timetable. Read below to see how to define different appointment types in code and in a UI.

Normal Appointments

A normal appointment is a non-recurring appointment that has start and end dates specified. Here is an example of objects defining a normal appointment.

JavaScript
var appointments = [
    {text: 'Meet with a customer', startDate: new Date(2015, 4, 10, 11, 0), endDate: new Date(2015, 4, 10, 13, 0)},
    {text: 'Discuss results', startDate: new Date(2015, 5, 11, 12, 0), endDate: new Date(2015, 4, 11, 13, 0)}
]

All Day Appointments

An all day appointment is a non-recurring appointment that lasts all day. To define an all day appointment, set the allDay field to true and specify the startDate field.

JavaScript
var appointments = [
    {text: 'Fix bugs', startDate: new Date(2015, 4, 10), allDay: true},
    //...
]

Scheduler All Day Appointment

In a UI, end users are provided with the All day field as well. When this field is set to true, it is not possible to set the start and end time of the appointment.

Scheduler All Day Appointment Details

All day appointments are displayed in the all day panel, which is always visible by default. If you do not intend to use all day appointments, you can hide the all day panel assigning false to the showAllDayPanel option.

Recurring Appointments

A recurring appointment occurs many times in the same time interval. An object defining a recurring appointment sets the start date and time of the recurrence series and specifies a rule according to which a series is repeated.

JavaScript
var appointments = [
    {
        text: "Meeting",
        startDate: new Date(2015, 2, 3, 8, 0),
        endDate: new Date(2015, 2, 3, 9, 0),
        recurrenceRule: "FREQ=DAILY;INTERVAL=2"
    },
    {
        text: "Report",
        startDate: new Date(2015, 2, 5, 10, 45),
        endDate: new Date(2015, 2, 5, 11, 15),
        recurrenceRule: "FREQ=WEEKLY;BYDAY=WE,SU"
    }
];

A recurring rule is set using the iCalendar RFC 2445 specification.

Scheduler All Day Appointment

In a UI, a recurring appointment is defined using a set of fields, all of which are saved to the recurrenceRule field of the appointment's data source object.

Scheduler All Day Appointment Details

NOTE: A recurring appointment is displayed as a number of appointments in a timetable, while a single appointment object is saved to the data source.

If you are editing or deleting a recurring appointment using a UI, the Scheduler prompts you to edit or delete only the active appointment or the entire series.

If you want to exclude some appointments from a recurrence, specify exceptions to the current recurring appointment using the recurrenceException option.

JavaScript
var appointments = [
    {
        text: "Meeting",
        startDate: new Date(2015, 4, 25, 9, 0),
        endDate: new Date(2015, 4, 25, 11, 30),
        recurrenceRule: "FREQ=DAILY",
        recurrenceException: "20150526T090000, 20150528T090000"
    },
    {
        text: "Report",
        startDate: new Date(2015, 4, 5, 10, 45),
        endDate: new Date(2015, 4, 5, 11, 15),
        recurrenceRule: "FREQ=WEEKLY;BYDAY=WE,SU"
    }
];

NOTE: The recurrenceException option enables you to specify an array of appointments to exclude. Each array item specifies an appointment by its start date and time. The start time of each excluded appointment should strictly match the start time of the initial appointment.