Open k0beLeenders opened 4 years ago
Hi, how I resolved this problem was putting in the PagesModule this provider
providers:[ { provide:NB_TIME_PICKER_CONFIG, useValue:{} } ]
In case anyone runs across this issue in the future, in addition to NbDatepickerModule.forRoot()
you also need to add NbTimepickerModule.forRoot()
.
Hi, how I resolved this problem was putting in the PagesModule this provider
providers:[ { provide:NB_TIME_PICKER_CONFIG, useValue:{} } ]
Thanks, The above solutions are working.
Issue type
I'm submitting a ... (check one with "x")
Issue description
Current behavior: If i try to import NbTimepickerModule in my module i get the error: _TS2724: Module '"../../../../nodemodules/@nebular/theme"' has no exported member 'NbTimepickerModule'. Did you mean 'NbDatepickerModule'?
When I insert this html code: <input nbInput placeholder="Pick Date" [nbDatepicker]="dateTimePicker"> <nb-date-timepicker withSeconds
dateTimePicker>_
I get this error: _ERROR NullInjectorError: R3InjectorError(PagesModule)[InjectionToken NB_TIME_PICKER_CONFIG -> InjectionToken NB_TIME_PICKER_CONFIG -> InjectionToken NB_TIME_PICKER_CONFIG -> InjectionToken NB_TIME_PICKER_CONFIG]: NullInjectorError: No provider for InjectionToken NB_TIME_PICKERCONFIG!
Expected behavior: A useable datetimepicker component.
Steps to reproduce:
Related code:
Snippet of app.module.ts: _/**
registerLocaleData(localeNl);
@NgModule({ declarations: [AppComponent], providers: [AuthGuardService], imports: [ NbEvaIconsModule, BrowserModule, BrowserAnimationsModule, HttpClientModule, AppRoutingModule, NbSidebarModule.forRoot(), NbMenuModule.forRoot(), NbDatepickerModule.forRoot(), NbDialogModule.forRoot(), NbWindowModule.forRoot(), NbToastrModule.forRoot(), NbChatModule.forRoot({ messageGoogleMapKey: 'AIzaSyAwNuCzia92MAmdLRzmqitRGvCF7wCZPY', }), CoreModule.forRoot(), ThemeModule.forRoot(), NbCardModule, FormsModule, NgbModule, CalendarModule.forRoot({ provide: DateAdapter, useFactory: adapterFactory }), NbDateFnsDateModule.forRoot({ parseOptions: { useAdditionalWeekYearTokens: true, useAdditionalDayOfYearTokens: true }, formatOptions: { useAdditionalWeekYearTokens: true, useAdditionalDayOfYearTokens: true }, }), ], bootstrap: [AppComponent], exports: [ ], }) export class AppModule { }