ng-bootstrap / ng-bootstrap

Angular powered Bootstrap

Home Page:https://ng-bootstrap.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Datepicker does not inherit config if startDate is set before ngOnInit is called.

zxanderh opened this issue · comments

Bug description:

If NgbDatepicker.navigateTo() is called (either manually, or by binding the [startDate] input) before the datepicker's ngOnInit() is called, then the datepicker will not inherit values from NgbDatepickerConfig.

Likely related to issue #3848.

Link to minimally-working StackBlitz that reproduces the issue:

https://stackblitz.com/edit/angular-pznaci

Versions of Angular, ng-bootstrap and Bootstrap:

I put the versions we're using, but from what I can tell, this bug has likely existed for quite some time.

Angular: 14

ng-bootstrap: 13

Bootstrap: 5