Skip to content

Commit a72fedc

Browse files
authored
fix(datepicker): reseting min and max boundaries will reset it in datepicker (#3112)
fixes #3085
1 parent 60f8b31 commit a72fedc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/datepicker/bs-datepicker.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ export class BsDatepickerComponent implements OnInit, OnDestroy, OnChanges {
207207
this._config = Object.assign({}, this._config, this.bsConfig, {
208208
value: this._bsValue,
209209
isDisabled: this.isDisabled,
210-
minDate: this.minDate || this._config.minDate,
211-
maxDate: this.maxDate || this._config.maxDate
210+
minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,
211+
maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate
212212
});
213213
}
214214

src/datepicker/bs-daterangepicker.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ export class BsDaterangepickerComponent
188188
{
189189
value: this._bsValue,
190190
isDisabled: this.isDisabled,
191-
minDate: this.minDate || this._config.minDate,
192-
maxDate: this.maxDate || this._config.maxDate
191+
minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,
192+
maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate
193193
}
194194
);
195195
}

0 commit comments

Comments
 (0)