'Issue with dateAdapter for specific language only
I am using Angular material date picker and I have a problem with specific language only - ka. Take a look at the following example:
constructor(
private dateAdapter: DateAdapter<Date>,
public noticesService:NoticesService,
public datepipe: DatePipe,
private sanitizer: DomSanitizer,
public router: Router) {
this.dateAdapter.setLocale('fr');
}
works as it should, take a look at the screenshot language changes and now the second language:
constructor(
private dateAdapter: DateAdapter<Date>,
public noticesService:NoticesService,
public datepipe: DatePipe,
private sanitizer: DomSanitizer,
public router: Router) {
this.dateAdapter.setLocale('ka');
}
Language doesn't change and stays in English. This problem occurs only with ka language, all other languages work like a charm, I honestly have no clue what can be an issue here and how to edit things in order for it to work.
This is datepicker HTML template:
<mat-form-field class="fullWidth padder forSelectLabel" appearance="outline">
<mat-label>დაბადების თარიღი</mat-label>
<div class="forSelect">
<img class="doc-icon" style="max-width: 30px" [src]="iconPath + 'date.svg'">
<input [(ngModel)]="dateOfBirth" placeholder="დაბადების თარიღი" autocomplete="off" matInput
[matDatepicker]="picker" name="dateOfBirth">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
</div>
</mat-form-field>
Solution 1:[1]
Can you try with this instead?
this.dateAdapter.setLocale('ka-GE');
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |


