NgbDateNativeAdapter provided in app.module sems not be considered
See original GitHub issueBug description:
When providing the NgbDateNativeAdapter in app.module.ts with
typescript providers: [ { provide: NgbDateAdapter, useClass: NgbDateNativeAdapter } ]
my model value is bound to a NgbDateStruct-Value representing the selected date. I expected it to be a “native” date, as transformed by NgbDateNativeAdapter.
Link to minimally-working plunker that reproduces the issue:
http://plnkr.co/edit/lkfKKxk63EjuoVWJrpiT?p=preview
Version of Angular, ng-bootstrap, and Bootstrap:
Angular: 6.1.3
ng-bootstrap: 3.0.0
Bootstrap: 4.1.3
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
ngbDatepicker with fromgroup not able to preset value (Native ...
I faced a similar issue. To solve import NgbDateNativeAdapter, NgbDateAdapter from @ng-bootstrap. import { NgbDateNativeAdapter ...
Read more >Angular Services, providedIn and Lazy Modules - | juri.dev
In this article we're going to explore some dependency injection particularities with Angular, specifically in combination with lazy loaded ...
Read more >Datepicker - Angular powered Bootstrap
The latest date that can be displayed or selected. If not provided, 'year' select box will display 10 years after the current month....
Read more >Angular Services, providedIn and Lazy Modules
It will tell angular application to provide the service in the application ... When you provide service as lazy loading module, then not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We can confirm it as a bug / regression in 3.0.0 - will fix in next release (to be cut early next week). Thnx for reporting!
The adapter does not work if you provide it in the AppModule and then use the DatePicker in a Lazy Loaded Feature module, I had to provide the adapter in the Feature module itself, in order that it can work.