From 1c3597491e68c4994e494b704099c9136f73dd54 Mon Sep 17 00:00:00 2001 From: Madhuravas Date: Wed, 31 Jan 2024 17:14:44 +0530 Subject: [PATCH] MOSIP-16525 Calendar displayed in english -for list of holiday masterdata Signed-off-by: Madhuravas --- .../mater-data-common-body/mater-data-common-body.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin-ui/src/app/features/masterdata/shared/mater-data-common-body/mater-data-common-body.component.ts b/admin-ui/src/app/features/masterdata/shared/mater-data-common-body/mater-data-common-body.component.ts index a39dbc51..6aa61695 100644 --- a/admin-ui/src/app/features/masterdata/shared/mater-data-common-body/mater-data-common-body.component.ts +++ b/admin-ui/src/app/features/masterdata/shared/mater-data-common-body/mater-data-common-body.component.ts @@ -34,6 +34,7 @@ import defaultJson from "../../../../../assets/i18n/default.json"; import { HeaderService } from 'src/app/core/services/header.service'; import { TranslateService } from '@ngx-translate/core'; import { AuditService } from 'src/app/core/services/audit.service'; +import { DateAdapter } from '@angular/material/core'; @Component({ selector: 'app-mater-data-common-body', @@ -100,6 +101,7 @@ export class MaterDataCommonBodyComponent implements OnInit { private headerService: HeaderService, private translateService: TranslateService, private auditService: AuditService, + private dateAdapter: DateAdapter ) { this.tomorrow.setDate(this.tomorrow.getDate() + 1); } @@ -109,6 +111,7 @@ export class MaterDataCommonBodyComponent implements OnInit { this.url = this.router.url.split('/')[3]; this.fieldsCount = 0; this.primaryLangCode = this.headerService.getUserPreferredLanguage(); + this.dateAdapter.setLocale(defaultJson.keyboardMapping[this.primaryLangCode]); console.log("this.primaryLangCode>>>"+this.primaryLangCode); console.log("config>>>"+defaultJson.languages["ara"].name); /*if(url === "blocklisted-words"){