-
Notifications
You must be signed in to change notification settings - Fork 156
Description
Description:
When using the Pivot Grid with autoGenerateConfig: true, date fields represented as timestamps (e.g., 1577829600000) or string values (e.g., "2008-06-20", "10/24/2025") are not recognized as Date objects during initialization.
As a result, the autoGenerateConfig logic does not create an IgxPivotDateDimension for such fields, and they are not automatically assigned as Row Dimensions as specified in the component’s behavior spec
Expected Behavior
-
Fields containing timestamps or valid date strings should be parsed into
Dateobjects on initialization. -
The Pivot Grid should auto-resolve them as
IgxPivotDateDimensionand enable them by default in the Row Dimensions collection. -
Example:
[ { Date: 1577829600000, Sales: 100 }, { Date: "2008-06-20", Sales: 200 } ]
Should produce a Row Dimension for Date, grouped as:
All Periods > 2008 > June > Fri Jun 20 2008
Current Behavior
- Timestamp or string date values remain unparsed and are treated as plain numeric or string fields.
- The
Datefield is skipped during auto-configuration. - When manually selecting and dragging the
Datefield in the Pivot Configurator, some transformation occurs — the values are displayed and grouped, but not as a proper Date hierarchy (e.g., shown as"2008-06-20"instead of grouped by period: All Periods → 2008 → June → Fri Jun 20 2008). This is probabbly another bug and possible improvement of the existing logic that handles the parsing upon dropping a field for Row Dimension.
Proposed Fix
Enhance the Pivot Grid’s auto-generation logic to:
- Detect and parse date-like strings and numeric timestamps into
Dateobjects. - Automatically resolve them as
IgxPivotDateDimensionduring configuration generation.