The update() method refreshes the context menu if it is currently visible.
Available since 2024.4.6226.
DayPilot.Menu.update()
const contextMenu = new DayPilot.Menu({
items: [
{
text: "Counter",
counter: 0,
onClick: (args) => {
args.preventDefault();
contextMenu.items[0].text = "Counter: " + (++args.item.counter);
contextMenu.update();
}
},
// ...
]
});