3

I want to do something similar to this: show only weekdays, however, I would like it to start on the first day of the week (or show from Sunday to the next Saturday).

I have tried setting a moment for the start and intervalStart option of the first day of the week (i.e. Sunday) but this doesn't seem to work.

Edit (from link above):

$('#calendar').fullCalendar({
    header: {
        left: '',
        center: '',
        right: '',
    },
    editable: true,
    views: {
        settimana: {
            type: 'agendaWeek',
            duration: {
                days: 7
            },
            title: 'Apertura',
            columnFormat: 'dddd', // Format the day to only show like 'Monday'
            hiddenDays: [0, 6] // Hide Sunday and Saturday?
        }
    },
    defaultView: 'settimana',
    });
coler-j
  • 1,791
  • 1
  • 27
  • 57

3 Answers3

2

For future reference, for custom views the dateAlignment option can be used to implement something like weekdaysOnlyView.

Dart Dega
  • 241
  • 3
  • 8
1

I was able to do this with:

$('#calendar').fullCalendar({
    ...  
    // Added the default date
    defaultDate: $.fullCalendar.moment().startOf('week'),
    ...
    });
coler-j
  • 1,791
  • 1
  • 27
  • 57
0

You can add firstDay: 1.

$('#calendar').fullCalendar({
  firstDay: 1,
})

or

let calendar = new FullCalendar.Calendar(calendarEl, {
 firstDay: 1,
 ...
});