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

How to skip a day of the week

Asked by Anonymous
3 years ago.

I am using Javscript daypilot to show business hours 8am - 6pm for everyday of the week. I am aware of being able to set showNonBusiness to false to hide weekends but if I want to for example not show a wednesday how would I go about doing this? I have tried using onIncludeTimeCell however this just hides the grid slots whereas I would want to just skip straight from Tuesday - Thursday

Thanks in advance

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

I'm not sure if that's what you mean but it's possible to exclude the hidden time from the event duration when moving events using drag and drop:
https://api.daypilot.org/daypilot-scheduler-eventmoveskipnonbusiness/

See also a related tutorial:
https://code.daypilot.org/57279/javascript-scheduler-skip-non-business-cells-during-drag-an

Please let me know if this is not what you are looking for.

Comment posted by Anonymous
3 years ago.

Hi Dan, sorry didn't explain myself well. I want to be able to hide certain days of the week from the scheduler. For example when setting showNonBusiness to false this remove Saturdays & Sundays from the calender, I would like to do this for other days of the week

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

In that case you can either use onIncludeTimeCell which can hide some of the generated time columns (https://doc.daypilot.org/scheduler/hiding-time-columns/) or you can build your own timeline by defining individual cells (https://doc.daypilot.org/scheduler/timeline/).

Just note that if onIncludeTimeCell handler is defined the showNonBusiness value is ignored (no columns will be hidden by default).

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