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

Logical overnight scheduling

Asked by Paul Muller
5 years ago.

https://doc.daypilot.org/calendar/overnight-scheduling/ documents how overnight scheduling works. I understand how it's done but that doesn't make sense to me - particularly because the component is marketed as an "event calendar component displays an Outlook-like day/week view."

Wouldn't it be way more logical to keep the begin/end hours as-is and support dragging events across day boundaries as Outlook and other calendars offer? What if one event spans from 4pm to 10am and the next from 8pm to 6am? How can this be achieved?

Answer posted by Dan Letecky [DayPilot]
5 years ago.

Hi Paul,

This feature is not intended as a workaround for displaying long events. It's designed for views where the day boundaries are shifted - e.g. tv listings.

The calendar will display events spanning multiple days. However, drag and drop moving is not enabled for such events. The reasons are mostly historical but the fact is that the Calendar component is not a good tool to handle such events (you are always missing important parts of the event when moving it). It's much better to use the Scheduler which lets you adjust the scale so you will see the whole event and the context (including possible overlaps, disabled areas, etc.).

Comment posted by Paul Muller
5 years ago.

Hi Dan,

Thanks for the feedback. I hear what you are saying. I haven't actually thought about using the scheduler for my project - it didn't initially seem like a good fit.

> drag and drop moving is not enabled for such events

Does that mean it's actually configurable i.e. I _could_ turn it on if desired?

Let me briefly describe what I'm after.

I need an elegant way for a user to configure a weekly power-saving plan for a device. Each event i.e. a block in the calendar represents a phase during which the device sleeps. A typical configuration might be:
A) Mon/Tue/Wed/Thu 8pm-6am (the following day)
B) Fri 6pm-midnight
C) Sat/Sun full day
D) Mon midnight-6am

B-D actually form a single event

So, rather than giving the user an (initially empty) collection of "from day + time -> to day + time", each represented by dropdown, textfield, dropdown, textfield and add/remove/clone/move-up/move-down/etc. actions, I thought about using a stripped down week calendar as a more convenient UI component.
There can't be any overlaps or disabled areas as they wouldn't make sense for the use case.

Would the scheduler work for this?

Comment posted by Dan Letecky [DayPilot]
5 years ago.

Hi Paul,

With the Scheduler, there are two options:

1. You can display a single row/resources a display the full week there. Something like this, just with one row:

https://javascript.daypilot.org/demo/scheduler/scalehours.html

However, scrolling would be necessary to view the whole week.

2. The Scheduler supports "Days" mode which lets you create a week view similar to the one created with the Calendar but with switched axes:

https://javascript.daypilot.org/demo/scheduler/timesheet.html

This gives a better overview of a full week on a single screen. The moving isn't perfect there either (the target position indicator doesn't show the next day) but it works. Unlike in the Calendar, it's worth fixing it in the Scheduler - if this kind of view worked for you.

Comment posted by Paul Muller
5 years ago.

Thank you so much, Dan.

That time sheet looks really nice. If I could drag event boundaries across days it would be close to perfect. As we're not making money with our software (open-source) we won't be able to afford a Pro license, though.

Still, thanks a lot for your support. I now have a much better understanding of what DayPilot can do (a lot!).

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.