I am trying to use Martin Wendt's context menu control with FullCalendar in a similar manner to this question.
A context menu is supposed to appear whenever an event is right clicked but the problem is that I am getting the following javascript error in the chrome developer console.
jquery.min.js:3 Uncaught TypeError: ((r.event.special[g.origType] || {}).handle || g.handler).apply is not a function
    at HTMLDocument.dispatch (jquery.min.js:3)
    at HTMLDocument.q.handle (jquery.min.js:3)
I have set up an example jsfiddle to illustrate the problem. The full html example is listed below for future reference in case the link dies.
<html>
<head>
    <meta charset='utf-8' />
    <link href="../Scripts/assets/plugins/calendar/dist/fullcalendar.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="../Content/jquery.contextMenu.min.css">
    <style>
        body {
            margin: 40px 10px;
            padding: 0;
            font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
            font-size: 14px;
        }
        #calendar {
            max-width: 900px;
            margin: 0 auto;
        }
    </style>
</head>
<body>
    <div id='calendar'></div>
    <script src='../Scripts/assets/plugins/jquery/jquery.min.js'></script>
    <script src="../Scripts/assets/plugins/calendar/jquery-ui.min.js"></script>
    <script src="../Scripts/assets/plugins/moment/moment.js"></script>
    <script src='../Scripts/assets/plugins/calendar/dist/fullcalendar.min.js'></script>
    <script src="../Scripts/jquery.contextMenu.min.js"></script>
    <script src="../Scripts/jquery.ui.position.js"></script>
    <script>
            $('#calendar').fullCalendar({
                defaultDate: '2019-08-12',
                editable: true,
                eventLimit: true,
                events: [
                    {
                        title: 'All Day Event',
                        start: '2019-08-01'
                    },
                    {
                        title: 'Long Event',
                        start: '2019-08-07',
                        end: '2019-08-10'
                    },
                    {
                        title: 'Conference',
                        start: '2019-08-11',
                        end: '2019-08-13'
                    },
                    {
                        title: 'Meeting',
                        start: '2019-08-12T10:30:00',
                        end: '2019-08-12T12:30:00'
                    }
                ]
                ,
                eventRender: function (event, element) {
                    var originalClass = element[0].className;
                    element[0].className = originalClass + ' hasmenu';
                },
                dayRender: function (day, cell) {
                    var originalClass = cell[0].className;
                    cell[0].className = originalClass + ' hasmenu';
                }
            })
            $(document).contextmenu({
                delegate: ".hasmenu",
                preventContextMenuForPopup: true,
                preventSelect: true,
                menu: [
                    { title: "Cut", cmd: "cut", uiIcon: "ui-icon-scissors" },
                    { title: "Copy", cmd: "copy", uiIcon: "ui-icon-copy" },
                    { title: "Paste", cmd: "paste", uiIcon: "ui-icon-clipboard", disabled: true },
                ],
                select: function (event, ui) {
                    // Logic for handing the selected option
                },
                beforeOpen: function (event, ui) {
                    ui.menu.zIndex($(event.target).zIndex() + 1);
                }
            });
    </script>
</body>
</html>
 
     
    