Skip to main content

ASPxClientScheduler.DeselectAppointmentById(aptId) Method

Client-side function that removes the appointment specified by its client ID from a collection of selected appointments.

Declaration

DeselectAppointmentById(
    aptId: string
): void

Parameters

Name Type Description
aptId string

An appointment’s identifier.

Remarks

The following example illustrates how to handle the ASPxClientScheduler.AppointmentsSelectionChanged client-side event and check if the selected appointment is in the past. To deselect these appointment(s), use the DeselectAppointmentById method and show a message to an end-user.

function SchedulerSelection(s, e) {
    var date = Date.now();
    var ids = e.appointmentIds;
    for (var i = 0; i < ids.length; i++) {
        var appointment = s.GetAppointmentById(ids[i]);
        if (appointment.GetEnd() - date < 0) {                    
            s.DeselectAppointmentById(ids[i]);
            alert("Appointment cannot be selected");
        }
    }
}
See Also