Skip to content

Commit 9f63814

Browse files
tzorattovlio20
authored andcommitted
Reset selection when model is falsy fix #127 (#436)
1 parent e5c68c1 commit 9f63814

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/app/month-calendar/month-calendar.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ export class MonthCalendarComponent implements OnInit, OnChanges, ControlValueAc
162162
this.yearMonths = this.monthCalendarService
163163
.generateYear(this.componentConfig, this.currentDateView, this.selected);
164164
this.inputValueType = this.utilsService.getInputType(this.inputValue, this.componentConfig.allowMultiSelect);
165+
} else {
166+
this.selected = [];
167+
this.yearMonths = this.monthCalendarService
168+
.generateYear(this.componentConfig, this.currentDateView, this.selected);
165169
}
166170

167171
this.cd.markForCheck();

0 commit comments

Comments
 (0)