akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.06k stars 1.51k forks source link

Can't import NbTimepickerModule #2594

Open k0beLeenders opened 4 years ago

k0beLeenders commented 4 years ago

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 { }



### Other information:
node --version: v10.18.0
npm --version: 6.13.4

**Angular, Nebular**
    "@nebular/auth": "6.2.1",
    "@nebular/date-fns": "^6.2.1",
    "@nebular/eva-icons": "^6.2.1",
    "@nebular/security": "6.0.0",
    "@nebular/theme": "6.2.1",
migueldur94 commented 4 years ago

Hi, how I resolved this problem was putting in the PagesModule this provider

providers:[ { provide:NB_TIME_PICKER_CONFIG, useValue:{} } ]

jeffk42 commented 3 years ago

In case anyone runs across this issue in the future, in addition to NbDatepickerModule.forRoot() you also need to add NbTimepickerModule.forRoot().

nikesh9220 commented 2 years ago

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.