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

How to not allow schedule on weekends

Asked by Naveen
4 years ago.

Is there any facility for not allow schedule on weekends Saturday and Sunday?

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

It's possible to the non-business hours in the Schedule using ShowNonBusiness property (it hides hours outside of BusinessBeginsHour and BusinessEndsHour and weekends):
https://doc.daypilot.org/scheduler/hiding-non-business-hours/

It's also possible to hide custom time columns from the automatically generate timeline:
https://doc.daypilot.org/scheduler/hiding-time-columns/

You can also generate your own timeline:
https://doc.daypilot.org/scheduler/timeline/

It's also possible to display the weekends and block drag and drop operations (time range selecting, event moving, event resizing) that don't meet custom rules implemented using TimeRangeSelectingJavaScript, EventMovingJavaScript, EventResizingJavaScript client-side event handlers. They get translated to the following client-side event handlers:

https://api.daypilot.org/daypilot-scheduler-ontimerangeselecting/
https://api.daypilot.org/daypilot-scheduler-oneventmoving/
https://api.daypilot.org/daypilot-scheduler-oneventresizing/

An example that blocks every target when moving an event:

<DayPilot:DayPilotScheduler
  EventMovingJavaScript="args.allowed=false;"
  // ...
/>
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.