Skip to main content

Appointment.AllDay Property

Gets or sets whether the current appointment lasts the entire day (or several days).

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v23.2.Core.dll

NuGet Package: DevExpress.Scheduler.Core

Declaration

bool AllDay { get; set; }

Property Value

Type Description
Boolean

True, if this is an all-day appointment; otherwise, false.

Remarks

If the AllDay property equals true, the appointment lasts for one or multiple days. The exact time of both Appointment.Start and Appointment.End dates are ignored. If the End day’s time is not equal 0:00, this day is included in the event.

Scheduler - AllDay2

Otherwise, if the End day’s time equals 0:00, the event lasts until 23:59:59 of the day before and does not include this End day.

Scheduler - AllDay

When users create or modify appointments at runtime using the Appointment Edit Form, the End is also included in the event duration.

All-day appointments do not belong to any time zone. When the current time zone of the scheduler (obtained from the host settings or specified by the SchedulerOptionsBehaviorBase.ClientTimeZoneId property) changes, the Start and End properties of the all-day appointment remain the same.

Example

The code below shows how to handle the SchedulerControl.AllowAppointmentDrag event to prevent all-day appointments from being dragged.

schedulerControl1.OptionsCustomization.AllowAppointmentDrag = UsedAppointmentType.Custom;

private void SchedulerControl1_AllowAppointmentDrag(object sender, AppointmentOperationEventArgs e) {
    e.Allow = !e.Appointment.AllDay;
}
See Also