Open jdmveira opened 4 years ago
Try adding this to your app.module.ts
:
import localeEs from '@angular/common/locales/es';
import {registerLocaleData} from '@angular/common';
registerLocaleData(localeEs, 'es');
...
providers: [{ provide: LOCALE_ID, useValue: "es" }], //also keep this that is already set on your module
Issue type
Error with nb-datepicker render with locale other than English
I'm submitting a ... (check one with "x")
Issue description
Using ngx-admin "as-is". If you add LOCALE_ID provider in app.module.ts other than "en" - i.e. "es" - nb-datepicker is not rendering as it should.
Current behavior:
If LOCALE_ID "es" is provided in app module, nb-datepicker stops rendering a calendar.
Expected behavior:
Steps to reproduce:
Related code:
/*
import { AppComponent } from "./app.component"; import { AppRoutingModule } from "./app-routing.module"; import { ThemeModule } from "./@theme/theme.module"; import { AuthModule } from "./@auth/auth.module";
import { NbChatModule, NbDatepickerModule, NbDialogModule, NbMenuModule, NbSidebarModule, NbToastrModule, NbWindowModule, } from "@nebular/theme";
@NgModule({ declarations: [AppComponent], imports: [ BrowserModule, BrowserAnimationsModule, HttpClientModule, AppRoutingModule,
], bootstrap: [AppComponent], providers: [{ provide: LOCALE_ID, useValue: "es" }], }) export class AppModule {}
Other information:
npm, node, OS, Browser
node: v14.5.0 npm: v6.14.5 OS: Windows 10 Browser: Edge Chromium
Angular, Nebular
Angular: v9.0.4 Nebular: v5.0.0