Hi,
I'd like to be able to use font-awesome icons for the images in the right click context menu. Would it be possible?
Thanks in advance.
Yes, it's possible. Just use the "icon" property to specify the CSS classes:
var dp = new DayPilot.Scheduler("dp", { // ... contextMenu: new DayPilot.Menu({ items: [ { text: "User details...", icon: "fas fa-user" } ] }), });
See also (now with a Font Awesome example): https://api.daypilot.org/daypilot-menu-items/
Very nice, thanks!
BTW, for dynamic menu context (my other question), I was thinking of trying to directly adjust items for the context menu in the onBeforeEventRender event. Do you think it's possible? I didn't find any good examples of how can I have dynamic menus (using JavaScript) depending on event's extra properties.
Please see my answer here: https://forums.daypilot.org/question/4704/dynamic-right-click-menu-content
It would be nice if in addition to disabled we can have visible attribute for the items, so we can hide them if needed.
Do you think it would be possible to add? [Alternatively, it can be named "hidden"]
The "hidden" property is implemented. It's now mentioned in the API docs as well (https://api.daypilot.org/daypilot-menu-items/).
Too bad there is no "Like" button in this forum :) Did you implement it just now or it was not mentioned in the docs? In any case, thanks a lot!