Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
0
igScheduler - how to disable/cancel edit form
posted

I'm using below code to implement scheduler and although I can redirect the new/open/edit event to my custom page, I'm still getting for a few seconds the standard new/edit form

Any idea how to cancel/disable that form but still using the open/edit appointment event

$("#scheduler").igScheduler({
height: "650px",
width: "100%",
views: ["monthView", "agendaView"],
monthViewSettings: {
isAgendaVisible: true
},
selectedDate: today,
dataSource: appointments,
resources: resources,

appointmentDialogOpened: function (e, args) {

//custom page to handle new event and open/edit event

if (args.isAppointmentNew)
window.location.replace('/events/AddEvent');
else
window.location.replace('/events/viewEvent/?id=' + args.owner._options.currentAppointment._ar);

}
});

Parents
No Data
Reply
  • 0
    Offline posted

    You can use appointmentDialogOpening method instead of appointmentDialogOpened. It is fired just before the modal is opened and you can cancel opening the form with e.PreventDefault(). Your code should look like this: 

    $("#scheduler").igScheduler({
        height: "650px",
        width: "100%",
        views: ["monthView", "agendaView"],
        monthViewSettings: {
            isAgendaVisible: true
        },
        selectedDate: today,
        dataSource: appointments,
        resources: resources,
        appointmentDialogOpening: function(e, args) {
            e.preventDefault()
            //custom page to handle new event and open/edit event

            if (args.isAppointmentNew)
                window.location.replace('https://www.igniteui.com/scheduler/overview');
            else
                window.location.replace('https://www.igniteui.com/scheduler/overview');

        }
    });

    You can find more information about all scheduler events here: https://www.igniteui.com/help/api/2021.1/ui.igScheduler

Children
No Data