@@ -147,6 +147,11 @@ export class CalendarMonthViewComponent implements OnChanges, OnInit, OnDestroy
147
147
*/
148
148
@Input ( ) openDayEventsTemplate : TemplateRef < any > ;
149
149
150
+ /**
151
+ * An array of day indexes (0 = sunday, 1 = monday etc) that indicate which days are weekends
152
+ */
153
+ @Input ( ) weekendDays : number [ ] ;
154
+
150
155
/**
151
156
* Called when the day cell is clicked
152
157
*/
@@ -211,11 +216,11 @@ export class CalendarMonthViewComponent implements OnChanges, OnInit, OnDestroy
211
216
*/
212
217
ngOnChanges ( changes : any ) : void {
213
218
214
- if ( changes . viewDate || changes . excludeDays ) {
219
+ if ( changes . viewDate || changes . excludeDays || changes . weekendDays ) {
215
220
this . refreshHeader ( ) ;
216
221
}
217
222
218
- if ( changes . viewDate || changes . events || changes . excludeDays ) {
223
+ if ( changes . viewDate || changes . events || changes . excludeDays || changes . weekendDays ) {
219
224
this . refreshBody ( ) ;
220
225
}
221
226
@@ -266,7 +271,8 @@ export class CalendarMonthViewComponent implements OnChanges, OnInit, OnDestroy
266
271
this . columnHeaders = this . utils . getWeekViewHeader ( {
267
272
viewDate : this . viewDate ,
268
273
weekStartsOn : this . weekStartsOn ,
269
- excluded : this . excludeDays
274
+ excluded : this . excludeDays ,
275
+ weekendDays : this . weekendDays
270
276
} ) ;
271
277
}
272
278
@@ -275,7 +281,8 @@ export class CalendarMonthViewComponent implements OnChanges, OnInit, OnDestroy
275
281
events : this . events ,
276
282
viewDate : this . viewDate ,
277
283
weekStartsOn : this . weekStartsOn ,
278
- excluded : this . excludeDays
284
+ excluded : this . excludeDays ,
285
+ weekendDays : this . weekendDays
279
286
} ) ;
280
287
if ( this . dayModifier ) {
281
288
this . view . days . forEach ( day => this . dayModifier ( day ) ) ;
0 commit comments