JavaScript/jQuery Scheduler - SchedulerAppointment
An object that describes an appointment in the Scheduler UI component.
allDay
Specifies whether the appointment lasts all day.
For details on all-day appointments, refer to the Appointment Types article.
endDateTimeZone
Specifies the time zone for an appointment's endDate. Accepts values from the IANA time zone database.
Users can view and edit the specified time zone in the appointment details form if you enable the editing.allowTimeZoneEditing property.
See Also
html
Specifies the HTML markup to be inserted into the appointment element.
The Scheduler component evaluates the html property's value. This evaluation, however, makes the Scheduler potentially vulnerable to XSS attacks. To guard against these attacks, encode the HTML markup before you assign it to the html property. Refer to the following help topic for more information: Potentially Vulnerable API - html.
You can use the text property as a safe alternative.
recurrenceException
Specifies the start date and time of one or more appointments to exclude from a series. This property requires that you also set recurrenceRule.
recurrenceRule
Specifies a recurrence rule based on which the Scheduler generates an appointment series.
The recurrenceRule value should contain an RRULE
pattern as per the iCalendar RFC 2445 specification.
If you need to obtain individual dates from an appointment series, use a 3rd-party library. In the following example, the rrule library is used:
const data = [{ text: 'Watercolor Landscape', startDate: new Date('2020-11-01T17:30:00.000Z'), endDate: new Date('2020-11-01T19:00:00.000Z'), recurrenceRule: 'FREQ=WEEKLY;BYDAY=MO,TH;COUNT=6', recurrenceException: '20201109T173000Z' }]; function logAppointmentOccurrences(appointmentData) { const startDateStr = DevExpress.localization.formatDate(appointmentData.startDate, "yyyyMMddTHHmmssZ"); const rule = new rrule.rrulestr( `DTSTART:${startDateStr}\n` + `RRULE:${appointmentData.recurrenceRule}\n` + `EXDATE:${appointmentData.recurrenceException}` ); const occurrences = rule.all(); occurrences.forEach(date => console.log(date)); }
See Also
startDateTimeZone
Specifies the time zone for an appointment's startDate. Accepts values from the IANA time zone database.
Users can view and edit the specified time zone in the appointment details form if you enable the editing.allowTimeZoneEditing property.
See Also
template
Specifies a template that should be used to render this appointment only.
The following types of the specified value are available.
- Assign a string containing the name of the required template.
- Assign a jQuery object of the template's container.
- Assign a DOM Node of the template's container.
- Assign a function that returns the jQuery object or a DOM Node of the template's container.
See Also
text
Specifies the subject of the appointment.
The subject will present the appointment in a timetable.