You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think you're wrong! 😆 This demo seems to be broken, I mean, none of the overrides are taken into account.
We definitely might have an issue with NgbInputDatepickerConfig
I provide both configs NgbDatepickerConfig and NgbInputDatepickerConfig. Still minDate and maxDate are not taken into account.
But, If I make a directive that attaches the minDate and maxDate attributes to the element (an input that has the ngbDatepicker directive) it works. It's a bit hacky and I would prefer to centralize this in the config how the interface suggests.
here is my config. Maybe I'm doing something wrong?
Bug description:
Hi, Maybe I'm wrong, but it seems that this example is misleading about minDate and maxDate
https://ng-bootstrap.github.io/#/components/datepicker/examples#config
When trying to customize minDate and MaxDate this config is not working even in StackBlitz
// customize default values of datepickers used by this component tree
config.minDate = {year: 1900, month: 1, day: 1};
config.maxDate = {year: 2099, month: 12, day: 31};
I end up using NgbDatepickerConfig instead of NgbInputDatepickerConfig
Link to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/run?file=app/datepicker-config.ts
Versions of Angular, ng-bootstrap and Bootstrap:
Angular: 10.0.0
ng-bootstrap: v7.0.0
Bootstrap: 4.5.0
The text was updated successfully, but these errors were encountered: