diff --git a/src/app/components/calendar/calendar.ts b/src/app/components/calendar/calendar.ts index ce28618cce4..6a5b0e3d4e2 100755 --- a/src/app/components/calendar/calendar.ts +++ b/src/app/components/calendar/calendar.ts @@ -732,10 +732,10 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor { * The minimum selectable date. * @group Props */ - @Input() get minDate(): Date { + @Input() get minDate(): Date | undefined { return this._minDate; } - set minDate(date: Date) { + set minDate(date: Date | undefined) { this._minDate = date; if (this.currentMonth != undefined && this.currentMonth != null && this.currentYear) { @@ -746,10 +746,10 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor { * The maximum selectable date. * @group Props */ - @Input() get maxDate(): Date { + @Input() get maxDate(): Date | undefined { return this._maxDate; } - set maxDate(date: Date) { + set maxDate(date: Date | undefined) { this._maxDate = date; if (this.currentMonth != undefined && this.currentMonth != null && this.currentYear) { @@ -1039,9 +1039,9 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor { inputFieldValue: Nullable = null; - _minDate!: Date; + _minDate?: Date; - _maxDate!: Date; + _maxDate?: Date; _showTime!: boolean;