The following steps helps you to add image/icon to the Scheduler context-menu items.
Sample link: http://js.syncfusion.com/demos/web/#!/azure/schedule/contextmenu UG link: http://help.syncfusion.com/js/schedule/context-menu
$(function () { var dManager = ej.DataManager(window.Default).executeLocal(ej.Query().take(10)); $("#Schedule1").ejSchedule({ width: "100%", height: "525px", currentDate: new Date(2014, 4, 5), contextMenuSettings: { enable: true, menuItems: { appointment: [ { id: "open", text: "Open Appointment" }, { id: "delete", text: "Delete Appointment" }, { id: "customMenu3", text: "Menu Item 3" }, { id: "customMenu4", text: "Menu Item 4" }, { id: "categorize", text: "Categorize" } ], cells: [ { id: "new", text: "New Appointment", sprite: "img-1" }, { id: "recurrence", text: "New Recurring Appointment" }, { id: "today", text: "Today" }, { id: "gotodate", text: "Go to date", sprite: "img-2" }, { id: "settings", text: "Settings" }, { id: "view", text: "View", parentId: "settings" }, { id: "timemode", text: "TimeMode", parentId: "settings" }, { id: "view_Day", text: "Day", parentId: "view" }, { id: "view_Week", text: "Week", parentId: "view" }, { id: "view_Workweek", text: "Workweek", parentId: "view" }, { id: "view_Month", text: "Month", parentId: "view" }, { id: "timemode_Hour12", text: "12 Hours", parentId: "timemode" }, { id: "timemode_Hour24", text: "24 Hours", parentId: "timemode" }, { id: "businesshours", text: "Business Hours", parentId: "settings" }, { id: "customMenu1", text: "Menu Item 1" }, { id: "customMenu2", text: "Menu Item 2" } ] } }, appointmentSettings: { dataSource: dManager, id: "Id", subject: "Subject", startTime: "StartTime", endTime: "EndTime", description: "Description", allDay: "AllDay", recurrence: "Recurrence", recurrenceRule: "RecurrenceRule", }, beforeContextMenuOpen: "OnBeforeOpen", }); }); function OnBeforeOpen(args) { var obj = $("#Schedule1").data("ejSchedule"); obj._contextMenu.ejMenu({ fields: { id: "id", text: "text", parentId: "parentId", spriteCssClass: "sprite" }, }); }
Figure 1: Image/Icon added for context-menu items.
Sample link: http://jsplayground.syncfusion.com/tlo3u2ev |
This page will automatically be redirected to the sign-in page in 10 seconds.