0

Parameter firstDay doesn't seem to work with type: 'agendaWeek' or dateAlignment: 'week'

I am trying to display the current week from given firstDay (say 2) but I cannot do that.

Duration parameter doesn't work, firstDay doesn't work, nothing work.

Except setting visibleRange: { start: '2017-10-03', end: '2017-10-08' } However, if I hardcode the current week it wouldn't work the next week, and I want it work whenever week I open it to display the current week starting with given week start date

enter image description here

Patlatus
  • 1,217
  • 2
  • 16
  • 28

1 Answers1

0

I have found the following solution:

var x = firstDay;
_FiveDaysWeek: {
                type: 'agendaWeek',
                hiddenDays: [ (x + 5) % 7, (x + 6) % 7 ]
            }

Propery hiddenDays works like a charm, for week starting from Tuesday I can set hiddenDays to [ 0, 1], for week starting from Wednesday I can set hiddenDays to [ 1, 2 ], for week starting from Monday I can set hiddenDays to [ 0, 6 ], for week starting on Sunday I can set hiddenDays to [ 5, 6 ].

Patlatus
  • 1,217
  • 2
  • 16
  • 28