Back to Fullcalendar

dayCount

_docs-v3/custom-views/dayCount.md

latest794 B
Original Source

Sets the exact number of days displayed in a custom view, regardless of weekends or hiddenDays.

<div class='spec' markdown='1'> Integer </div>

When a view's range is specified with a duration, hidden days will simply be omitted, and the view will stretch to fill the missing space. However, if you specify dayCount, you are guaranteed to see a certain number of days.

Example for a Custom View:

js
$('#calendar').fullCalendar({
  weekends: false,
  defaultView: 'agendaFourDay',
  views: {
    agendaFourDay: {
      type: 'agenda',
      dayCount: 4
    }
  }
});

Simpler example for a calendar with one view:

js
$('#calendar').fullCalendar({
  weekends: false,
  defaultView: 'agenda',
  dayCount: 4
});