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

Part Time employees

Related article: PHP Annual Leave Scheduling (JavaScript/HTML5 Frontend, MySQL Database)
Asked by radu
4 months ago.

Great job, and thank you! For part-time employees, is there a way to specify their working days (such as Tuesday and Friday) and only consider these days for counting? Thank you!

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

You can mark specified days as disabled using onBeforeCellRender in the Scheduler component.

This method is used in the tutorial to disable weekends:

onBeforeCellRender: (args) => {
  const day = args.cell.start.getDayOfWeek();
  if (day === 6 || day === 0) {
    args.cell.disabled = true;
  }
},

This approach prevents the creation of new records in the disabled areas and also prohibits moving existing events to these areas.

The JavaScript Scheduler: Displaying Holidays tutorial explains how to specify custom date ranges for each resource individually.

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