How to clear selected events with ctrl + click

Asked by Michael Wolf
2 years ago.

How do I clear selected events that have been highlighted with ctrl + click.

The clearSelection() method is not working.

contextMenu: new DayPilot.Menu({
  items: [
    {
      text: "Copy",
      onClick: (args) => {
        clipboard = args.source.data;
        const dp = args.source.calendar;
        dp.clearSelection();
        console.log("Copicat", clipboard);
      }
    },
    {
      text: "Copy Multiple",
      onClick: (args) => {
        const dp = args.source.calendar;
        dp.clearSelection();
        console.log("Copicat", multiclipboard);
      }
    }
  ]
}),

This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.