You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like it's not possible to override the datepicker locale on a per-datepicker / component basis, but only at the app level:
we @Inject(LOCALE_ID) private _locale in the NgbDatepickerI18nDefault
we have only one instance of the i18n service in the NgbDatepickerModule : {provide: NgbDatepickerI18n, useClass: NgbDatepickerI18nDefault}
Note that NgbDatepickerI18nDefault is private.
So we probably should move {provide: NgbDatepickerI18n, useClass: NgbDatepickerI18nDefault} to the datepicker component instead of the module, so you could override locale anywhere.
However, in this case we should inject NGB_DATEPICKER_LOCALE_ID that will use LOCALE_ID by default not to interfere with the rest of the application.
The text was updated successfully, but these errors were encountered:
It looks like it's not possible to override the datepicker locale on a per-datepicker / component basis, but only at the app level:
@Inject(LOCALE_ID) private _locale
in theNgbDatepickerI18nDefault
NgbDatepickerModule
:{provide: NgbDatepickerI18n, useClass: NgbDatepickerI18nDefault}
Note that
NgbDatepickerI18nDefault
is private.So we probably should move
{provide: NgbDatepickerI18n, useClass: NgbDatepickerI18nDefault}
to the datepicker component instead of the module, so you could override locale anywhere.However, in this case we should inject
NGB_DATEPICKER_LOCALE_ID
that will useLOCALE_ID
by default not to interfere with the rest of the application.The text was updated successfully, but these errors were encountered: