search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Double planned in times

Asked by David
12 years ago.
Hello Dan,

I read in the roadmap of the latest version that it is possible to prevent items form being planned in at the same time. Could you enlighten me how this is realised?
I have another question regarding the non-bussiness hours. When i used this option in the Calendar, it will still display the weekends. Is it possible to dissable this view? And will hiding of bussines hours be suported within the scheduler control in the (near) future?

Thanks in advance!!

Comment posted by Dan Letecky
12 years ago.
Hi David:

1. Prevent event overlapping
The traditional way is to handle this in the event handler on the server side. That means you check the input (from resize/move/time selection against the DB and deny the action, possibly sending a message to the user using Update("Not allowed") call.

For a long time, I had a plan to include the client-side support as well (some kind of a visual hint that it's not possible to drop the moved event on a busy time slot). This was scheduled for 4.4 but I didn't manage to implement it yet.

However, I have started working on this feature - you can test the first prototype in the sandbox (right on the main page of the Calendar demo). It handles event moving quite well, it handles resizing (still somewhat buggy, it breaks after a callback update), and time range selection is not implemented at all.

It works the following way: You enable event overlap protection by setting PreventEventOverlap="true" (the property name might change in the final release). The forbidden operation is indicated by a changed cursor during dragging (cursor: not-allowed CSS definition).

2. Non-business days
I've posted the how-to in Hiding times that are non business days thread. That thread is not exactly about this questions but people will be looking for a solution there (as you did ;-).

3. Hiding non-business hours/days in the Scheduler
I've just implemented this feature for the new DayPilotSchedulerDynamic (4.4) and it required a major redesign. I'm not sure if I'm going to add it to DayPilotScheduler as well (this change would break almost every existing routine). I will rather focus on improving the dynamic Scheduler so it will be a replacement for DayPilotScheduler.
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.