Skip to content

Commit 0fe30c6

Browse files
authored
Merge branch 'master' into tzhelev/samples-routing
2 parents a38f510 + a3b8bd1 commit 0fe30c6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/app/grid/grid-crm/grid-crm.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
121121
scrollStrategy: new CloseScrollStrategy()
122122
};
123123

124+
private frmt: Intl.DateTimeFormat;
125+
124126
constructor(private excelExporterService: IgxExcelExporterService) { }
125127

126128
public ngOnInit() {
@@ -173,7 +175,10 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
173175
}
174176

175177
public formatDate(val: Date) {
176-
return new Intl.DateTimeFormat("en-US").format(val);
178+
if (!this.frmt) {
179+
this.frmt = new Intl.DateTimeFormat("en-US");
180+
}
181+
return this.frmt.format(val);
177182
}
178183

179184
public searchKeyDown(ev) {

0 commit comments

Comments
 (0)