The month view (DayPilot.Month class) doesn't recognize all-day events because they are displayed the same way as normal events. Unlike the Calendar which displays them in a special row below the day headers:
http://javascript.daypilot.org/demo/calendar/allday.html
In order to prevent creating events in cells with events you can use onTimeRangeSelect event and check the selected time range using dp.events.forRange() method (dp.event.forRange() is available since build 8.1.1912).
dp.onTimeRangeSelect = function(args) {
if (!dp.events.forRange(args.start, args.end).isEmpty()) {
dp.message("There are existing events in the selected day range");
args.preventDefault(); // stops further processing, prevents also onTimeRangeSelected from being fired
}
};
dp.onTimeRangeSelected = function(args) {
// open the dialog for entering new event details...
};
You can download build 8.1.1912 in the sandbox:
http://javascript.daypilot.org/sandbox/
The scheduler solves this problem in a more elegant way - you can simply set .allowEventOverlap = false:
http://javascript.daypilot.org/demo/scheduler/eventoverlapping.html
It will prevent onTimeRangeSelect from being fired and the selection color is changed to red in real time. However, this is not yet implemented in the Month control.