1

I use mat-datepicker in my app but when I change the LOCAL_ID to 'fa-IR' the arrangement of months and the days of month is incorrect as seen in this picture:
material datepicker.

how can I do it correctly?
sample link

M_Farahmand
  • 954
  • 2
  • 9
  • 21

1 Answers1

4

I reported this bug to angular material and they introduced a repository which solve this problem (as workaround).

Should rewrite DateAdapter with this one.

 {provide: DateAdapter, useClass: JalaliMomentDateAdapter, deps: 
 [MAT_DATE_LOCALE]},
 {provide: MAT_DATE_FORMATS, useValue: JALALI_MOMENT_FORMATS},

Thanks from peyman ebrahimi for all of his efforts.

M_Farahmand
  • 954
  • 2
  • 9
  • 21