1

The default calendar in Nebular's date picker is Gregorian.

But JavaScripts supports much more calendars. Mozilla JS Docs shows following list: buddhist, chinese, coptic, ethiopia, ethiopic, gregory, hebrew, indian, islamic, iso8601, japanese, persian, roc

Nebular docs has no entries on how to config date picker to use a specific calendar. I looked at Angular's i18n docs and googled and finally found this solution:

// app.module.ts
import %lang% from '@angular/common/locales/%locale%';
import {registerLocaleData} from '@angular/common';
registerLocaleData(%lang%);

@NgModule({
    providers: [
        {provide: LOCALE_ID, useValue: '%locale%'},
    ]})

It kinda works but is not a solution to my problem. I want to change calendar, but it only translates month names, and some other i18n things (like fixing first day of week), but still Gregorian calendar is used.

How can I force it to use other calendars?

Thank you.

kian
  • 1,449
  • 2
  • 13
  • 21
jyejvcdck
  • 11
  • 1

0 Answers0