Skip to content

Commit e4aed52

Browse files
authored
Merge branch '15.0.x' into vkombov/fix-12391-15.0.x
2 parents 668560b + 14fe923 commit e4aed52

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid-dimensions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface IPivotDateDimensionOptions {
4747
export class IgxPivotDateDimension implements IPivotDimension {
4848
/** Enables/Disables a particular dimension from pivot structure. */
4949
public enabled = true;
50-
50+
5151
/**
5252
* Gets/Sets data type
5353
*/
@@ -80,6 +80,7 @@ export class IgxPivotDateDimension implements IPivotDimension {
8080
/** @hidden @internal */
8181
public memberName = 'AllPeriods';
8282
private _resourceStrings = CurrentResourceStrings.GridResStrings;
83+
private _monthIntl = new Intl.DateTimeFormat('default', { month: 'long' });
8384

8485
/**
8586
* Creates additional pivot date dimensions based on a provided dimension describing date data:
@@ -108,7 +109,7 @@ export class IgxPivotDateDimension implements IPivotDimension {
108109
memberName: 'Months',
109110
memberFunction: (rec) => {
110111
const recordValue = PivotUtil.extractValueFromDimension(inBaseDimension, rec);
111-
return recordValue ? new Date(recordValue).toLocaleString('default', { month: 'long' }) : rec['Months'];
112+
return recordValue ? this._monthIntl.format(new Date(recordValue)) : rec['Months'];
112113
},
113114
enabled: true,
114115
childLevel: baseDimension

0 commit comments

Comments
 (0)