In my newly created Angular app, I'm trying to use the angular-calendar by mattlewis92 to create his calendar. I've taken copied all of the steps and code listed on his github: https://mattlewis92.github.io/angular-calendar/#/kitchen-sink but I keep getting an error that says Error: StaticInjectorError(AppModule)[CalendarDayViewComponent -> Date Adapter]: NullInjectorError: No provider for DateAdapter!
In my app.module.ts
, I have this, and have imported all of them also:
imports: [
CalendarModule.forRoot({
provide: DateAdapter,
useFactory: adapterFactory
})
]
the only thing that I can see being a problem is that I use Moment also, so I have this in my providers:
{ provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE] }
Any help would be greatly appreciated on why this is happening or how I would go about fixing it, thanks!