calendar.on('scheduleDblClick', function({ source, date }) {
if (source.nonWorkingDays[date.getDay()]) {
// Prevent the event continuing if it's on a non-working day
return false;
}
})
Thanks Tasnim.
I need a custom set of dates to lookup against and return false.
How can I access a value inside the AppConfig where I define the listener for scheduleDblClick?
This does not help with my condition.
I have used a workaround to check the date when onAfterEventSave event and check if it is a holiday and then remove the event from event store.
I would work I believe
This worked for me.
I could not use the scheduleDblClick event as I had to use some dates generated programatically and use those dates to determine the non working dates.
I created my own validation based on the data from onAfterSave event and show custom message.