Hi Stefano,
Thank for Contacting Syncfusion support.
We have prepared a workaround sample to meet your requirement adding image before the text and disable menu items, which can be downloaded from the below location.
Please refer to the following code example used in the above sample.
<Code>
<div id="ControlRegion">
<ej-schedule id="Schedule1" width="100%" height="525px" current-date="new DateTime(2017, 6, 6)" create="onCreate" before-context-menu-open="OnBeforeOpen">
<e-appointment-settings subject='"Subject"' start-time='"StartTime"' end-time='"EndTime"' all-day='"AllDay"' recurrence='"Recurrence"' recurrence-rule='"RecurrenceRule"'>
<e-datamanager url="http://js.syncfusion.com/demos/ejServices/api/Schedule/LoadData" cross-domain="true"></e-datamanager>
</e-appointment-settings>
</ej-schedule>
</div>
<script>
function onCreate(args) {
$("#Schedule1").ejSchedule({
contextMenuSettings: {
enable: true,
menuItems: {
appointment: [ // Adding the image before menu item text
{ id: "open", text: "Edit", sprite: "e-icon e-edit_01 e-scheduleedit" },
{ id: "delete", text: "Delete", sprite: "e-icon e-delete e-scheduledelete" }
],
}
}
});
}
function OnBeforeOpen(args) {
var obj = $("#Schedule1").data("ejSchedule");
obj._contextMenu.ejMenu({
fields: { id: "id", text: "text", spriteCssClass: "sprite" }, // Here we are mapping the menu fields
});
setInterval(disableMenuItem, 1000); // Here calling the disableMenuItem method to disable the menu item
}
function disableMenuItem() {
var obj = $("#Schedule1").data("ejSchedule");
var contextObj = obj._contextMenu.data("ejMenu");
contextObj.disableItemByID("delete"); // By using the public method disableItemByID disabling the menu item
}
</script>
</Code>
Please look into our below UG link to know more about the Schedule Context Menu options.
Regards,
Velmurugan