javascript context menu icon image

The context menu can display an image next to the item text.

JavaScript

You can display an image (JPEG, PNG, GIF, SVG) next to a menu item text using image property:

dp.contextMenu = new DayPilot.Menu({
  items: [
    {text: "Delete", image: "delete.png",  onClick: args => { dp.events.remove(args.source); } }
  ]
});

The context menu also supports font icons (such as Font Awesome). To display a font icon, specify the font icon CSS class (or classes) using the icon property:

dp.contextMenu = new DayPilot.Menu({
  items: [
    {text: "User details", icon: "fas fa-user",  onClick: args => { DayPilot.Modal.alert("User details"); } }
  ]
});

See also:

ASP.NET WebForms

Specify the image URL using Image property

<daypilot:daypilotmenu id="DayPilotMenu1" runat="server" CssClassPrefix="menu_default" ShowMenuTitle="true">
  <DayPilot:MenuItem Text="Delete (CallBack)" Action="Callback" Command="Delete" Image='../Media/linked/menu_delete.png' />
</daypilot:daypilotmenu>