How to prevent the edit window from opening when read-only mode is enabled?
This knowledge base article explains the way to prevent the edit window from opening when read-only mode is enabled.
Step 1: Create a default schedule with read-only mode enabled by referring the instructions given in the below UG link.
https://help.syncfusion.com/js/schedule/working-with-appointments#read-only
Step 2: Disable the quick window by using showQuickWindow API and define the appointmentWindowOpen event as shown below.
$(function () {
$("#Schedule1").ejSchedule({
width: "100%",
height: "525px",
currentDate: new Date(2017, 5, 5),
readOnly: true,
showQuickWindow: false,
appointmentSettings: {
dataSource: window.Startend,
id: "Id",
subject: "Subject",
startTime: "StartTime",
endTime: "EndTime",
description: "Description",
allDay: "AllDay",
recurrence: "Recurrence",
recurrenceRule: "RecurrenceRule"
},
appointmentWindowOpen: "onAppointmentWindowOpen"
});
});
Step 3: Within the appointmentWindowOpen scheduler event, disable the detailed window by setting args.cancel to true as shown below.
function onAppointmentWindowOpen(args) {
var obj = $("#Schedule1").data("ejSchedule");
args.cancel = obj.model.readOnly;
}
Step 4: Run the sample, both appointment quick window and edit window will not be opened while interacting with the appointment.
Sample: https://jsplayground.syncfusion.com/mlxapyc5