Hide Delete Icon and Prevent Delete for Scheduler Appointments
I have prevented my users from deleting appointments by overriding the `beforeAppointmentRemove` event
function onAppointmentRemoved(evt)
{
evt.cancel = true; // Prevent Appointments from being deleted
}
However, I also want to hide/disable the [X] icon that appears when the mouse hovers over the appointment.
This needs to be for all Scheduler views (week; work week, month and agenda)
Is this possible?
Regards,
SIGN IN To post a reply.
6 Replies
JR
Jason Russell
October 10, 2017 12:59 AM UTC
I've achieved this by adding the appointmentHover event with the following code
function onAppointmentHover(args)
{
$(".e-schedulemouseclose").css("visibility", "hidden");
}
Please advise if there is a better way of achieving this
NR
Nevitha Ravi
Syncfusion Team
October 10, 2017 06:02 AM UTC
Hi Jason,
Thank you for contacting Syncfusion Support.
We can hide the delete icon [X} and prevent Scheduler appointments delete action by setting allowDelete property to false and for the same we have prepared the sample for your reference which can be viewed from the below link.
<Code>
$("#Schedule1").ejSchedule({
width: "100%",
height: "525px",
currentDate: new Date(2017, 5, 5),
allowDelete: false,
appointmentSettings: {
dataSource: dManager,
id: "Id",
subject: "Subject",
startTime: "StartTime",
endTime: "EndTime",
description: "Description",
allDay: "AllDay",
recurrence: "Recurrence",
recurrenceRule: "RecurrenceRule"
}
});
</Code>
Regards,
Nevitha.
JR
Jason Russell
October 10, 2017 06:08 AM UTC
Please update your documentation as that property is not listed: https://help.syncfusion.com/api/js/ejschedule#members
NR
Nevitha Ravi
Syncfusion Team
October 12, 2017 11:24 AM UTC
Hi Jason,
Sorry for the inconvenience caused.
We have added the API content for the property allowDelete which can be viewed from the below online link.
https://help.syncfusion.com/api/js/ejschedule#members:allowdelete
Regards,
Nevitha .
JR
Jason Russell
October 13, 2017 01:11 AM UTC
Awesome thank you. I can also confirm that this solution met my requirements
NR
Nevitha Ravi
Syncfusion Team
October 13, 2017 08:35 AM UTC
Hi Jason,
Thanks for your update.
We are happy that our solution meets your requirement.
Regards,
Nevitha.
SIGN IN To post a reply.
- 6 Replies
- 2 Participants
-
JR Jason Russell
- Oct 9, 2017 09:21 AM UTC
- Oct 13, 2017 08:35 AM UTC