{"action":"created","issue":{"url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/2928","labels_url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/2928/labels{/name}","comments_url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/2928/comments","events_url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/2928/events","html_url":"https://github.com/fullcalendar/fullcalendar/issues/2928","id":115093888,"number":2928,"title":"removeEvents() does not work on client events because it checks ev._id","user":{"login":"martin-langhoff","id":5116932,"avatar_url":"https://avatars.githubusercontent.com/u/5116932?v=3","gravatar_id":"","url":"https://api.github.com/users/martin-langhoff","html_url":"https://github.com/martin-langhoff","followers_url":"https://api.github.com/users/martin-langhoff/followers","following_url":"https://api.github.com/users/martin-langhoff/following{/other_user}","gists_url":"https://api.github.com/users/martin-langhoff/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-langhoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-langhoff/subscriptions","organizations_url":"https://api.github.com/users/martin-langhoff/orgs","repos_url":"https://api.github.com/users/martin-langhoff/repos","events_url":"https://api.github.com/users/martin-langhoff/events{/privacy}","received_events_url":"https://api.github.com/users/martin-langhoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-04T16:37:41Z","updated_at":"2015-11-04T16:44:00Z","closed_at":null,"body":"```removeEvents(\"string\")``` leads to this callback:\r\n```\r\n\t\t\tfilter = function(event) {\r\n\t\t\t\treturn event._id == eventID;\r\n\t\t\t};\r\n```\r\nSome of my events are from \"external events\" (dropped jQ widgets). eventReceive looks like:\r\n\r\n```\r\n    eventReceive: function(ev) {\r\n                   (...)\r\n                    var uidlen=10;\r\n                    ev.id = 'client_' + (Math.random().toString(36)+'00000000000000000').slice(2, uidlen+2);\r\n                    (...)\r\n                    calendar.updateEvent(ev);\r\n   }\r\n```\r\n\r\nFor those client events, ```id``` is as expected, but ```_id``` contains strings like ```_fc6```.\r\n\r\nNot sure the right path,\r\n\r\n* Should updateEvent update _id to match?\r\n* Should removeEvents match against id?\r\n* Should the docs recommend saying removeEvents(ev._id) ? \r\n"},"comment":{"url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/comments/153787687","html_url":"https://github.com/fullcalendar/fullcalendar/issues/2928#issuecomment-153787687","issue_url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/2928","id":153787687,"user":{"login":"martin-langhoff","id":5116932,"avatar_url":"https://avatars.githubusercontent.com/u/5116932?v=3","gravatar_id":"","url":"https://api.github.com/users/martin-langhoff","html_url":"https://github.com/martin-langhoff","followers_url":"https://api.github.com/users/martin-langhoff/followers","following_url":"https://api.github.com/users/martin-langhoff/following{/other_user}","gists_url":"https://api.github.com/users/martin-langhoff/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-langhoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-langhoff/subscriptions","organizations_url":"https://api.github.com/users/martin-langhoff/orgs","repos_url":"https://api.github.com/users/martin-langhoff/repos","events_url":"https://api.github.com/users/martin-langhoff/events{/privacy}","received_events_url":"https://api.github.com/users/martin-langhoff/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T16:44:00Z","updated_at":"2015-11-04T16:44:00Z","body":"as a workaround, this works flawlessly for me (on 2.4.0):\r\n```\r\n                eventClick: function(ev) {\r\n                    var calendar = $scope.ctrl.uiCalendarConfig.calendars.mainCalendar.fullCalendar('getCalendar');\r\n                    // FIXME: handle server-backed event deletion\r\n                    // FIXME: use ev.id once we have the fix for\r\n                    //        https://github.com/fullcalendar/fullcalendar/issues/2928\r\n                    calendar.removeEvents(ev._id);\r\n                },\r\n```"}}