hi there…
is it possible to delete all Events for a given date range, without iterating through scheduler.getEvents() ?
hi there…
is it possible to delete all Events for a given date range, without iterating through scheduler.getEvents() ?
yes… this will work… thank you!
Hey @Polina,
The snippet seems to be missing (to delete events in a date range). Do you have it available somewhere else? Was hoping to see if it would work for my use case.
Thanks,
Mark
Hello @markatfin,
You can delete events for a date range in two steps:
getEvents
method:deleteEvent(id)
:method for each of them, like follows:
function deleteEvs(){
var evs = scheduler.getEvents(new Date(2024, 5, 24),new Date(2024, 5, 30));
for (var i=0; i<evs.length; i++){
scheduler.deleteEvent(evs[i].id)
}
}
Here is a demo(click the delete events button):
https://snippet.dhtmlx.com/t0vtukep
Kind regards,