edit doc

duration

Sets the exact duration of a custom view.

Example for a Custom View:

var calendar = new Calendar(calendarEl, {
  defaultView: 'timeGridFourDay',
  views: {
    timeGridFourDay: {
      type: 'timeGrid',
      duration: { days: 4 }
    }
  }
});

Simpler example for a calendar with one view:

var calendar = new Calendar(calendarEl, {
  defaultView: 'timeGrid',
  duration: { days: 4 }
});

Special Case

If the duration is specified like {weeks:1}, then the dateAlignment will automatically default to start-of-week. However, if it is specified as {days:7}, then no such alignment will happen.