@@ -299,6 +299,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
299299 this . _pivotConfiguration = value ;
300300 this . emitInitEvents ( this . _pivotConfiguration ) ;
301301 this . filteringExpressionsTree = PivotUtil . buildExpressionTree ( value ) ;
302+ this . setDateDimensionsLocaleData ( ) ;
302303 if ( ! this . _init ) {
303304 this . setupColumns ( ) ;
304305 }
@@ -995,6 +996,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
995996 this . setupColumns ( ) ;
996997 // Bind to onResourceChange after the columns have initialized the first time to avoid premature initialization.
997998 onResourceChangeHandle ( this . destroy$ , ( ) => {
999+ this . setDateDimensionsLocaleData ( ) ;
9981000 // Since the columns are kinda static, due to assigning DisplayName on init, they need to be regenerated.
9991001 this . setupColumns ( ) ;
10001002 } , this ) ;
@@ -2487,6 +2489,35 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
24872489
24882490 protected trackHorizontalRowGroup = ( _index : number , rowGroup : IPivotGridRecord [ ] ) => rowGroup [ 0 ] ?. dataIndex ;
24892491
2492+ /**
2493+ * Sets the locale and resourceStrings data based on the grid's properties for all IgxPivotDateDimensions in the config.
2494+ */
2495+ protected setDateDimensionsLocaleData ( ) {
2496+ const topDimensions = [ ...this . columnDimensions , ...this . rowDimensions ] ;
2497+ for ( const dim of topDimensions ) {
2498+ let foundDateDim : IgxPivotDateDimension | undefined ;
2499+ if ( dim instanceof IgxPivotDateDimension ) {
2500+ foundDateDim = dim ;
2501+ } else if ( dim . childLevel ) {
2502+ var curChild : IPivotDimension | undefined = dim . childLevel ;
2503+ while ( curChild ) {
2504+ if ( curChild instanceof IgxPivotDateDimension ) {
2505+ foundDateDim = curChild ;
2506+ break ;
2507+ }
2508+ curChild = curChild . childLevel ;
2509+ }
2510+ }
2511+
2512+ if ( foundDateDim ) {
2513+ foundDateDim . resourceStrings = this . resourceStrings ;
2514+ if ( this . locale ) {
2515+ foundDateDim . locale = this . locale ;
2516+ }
2517+ }
2518+ }
2519+ }
2520+
24902521 /**
24912522 * @hidden @internal
24922523 */
0 commit comments