2026.1.5 and 2026.3.3 - Data grid column type 'date' and 'dateTime' causing error rendering dashboard

2026.1.5 and 2026.3.3 - Data grid column type 'date' and 'dateTime' causing error rendering dashboard

avatar

I have found if a data grid column is set to type 'date' or 'dateTime', an error appears when rendering the app. I do not see any additional logs throwing in the app's logging page or PSU's logging page.

2026.1.5:

2026.3.3:

Code:

New-UDPage -Url "/report-testreport" -Name "report-testreport" -Content {
    New-UDDataGrid -LoadRows {
        $Data = @(
            @{
                Name = 'Adam'
                Number = Get-Random -Minimum 1 -Maximum 10
                Boolean = if ((Get-Random -Minimum 1 -Maximum 10) -ge 6) { $true } else { $false }
                DateTime = Get-Date
            }
            @{
                Name = 'Tom'
                Number = Get-Random -Minimum 1 -Maximum 10
                Boolean = if ((Get-Random -Minimum 1 -Maximum 10) -ge 6) { $true } else { $false }
                DateTime = Get-Date
            }
            @{
                Name = 'Sarah'
                Number = Get-Random -Minimum 1 -Maximum 10
                Boolean = if ((Get-Random -Minimum 1 -Maximum 10) -ge 6) { $true } else { $false }
                DateTime = Get-Date
            }
        )
        $Data | Out-UDDataGridData -Context $EventData -TotalRows $Data.Count
    } -Columns @(
        New-UDDataGridColumn -Field 'Name'
        New-UDDataGridColumn -Field 'Number'
        New-UDDataGridColumn -Field 'Boolean'
        New-UDDataGridColumn -Field 'DateTime' -Type 'dateTime' # Both 'date' and 'dateTime' cause the errors. Commenting out the type parameter prevents the error.
    )
} -AutoInclude

19025e2d-9f57-42e1-8721-c0f2ee123321.png

1cf9c76e-fb61-4994-aecc-7474c1780e59.png

All Comments (1)

avatar

Hello,

Thank you for the clear repro script, it made this easy to trace.

What you found is a product defect, and it affects both 2026.1.5 and 2026.3.3.

The data grid sends each cell value to the browser as text, dates included.

When a column is set to date or dateTime, the grid in the browser only accepts real date objects, so it throws an error on the first row.

PowerShell Universal does not turn the text into a date before it hands it to the grid.

That is why removing -Type makes the page load again.

The messages on screen come from a second problem.

The error handler that should show and log the real error fails itself, so the original message is hidden and nothing reaches the app log.

I am reporting both issues to the PowerShell Universal development team.

In the meantime, you can keep it as a plain text column and send the date as a sortable string:


# In -LoadRows
DateTime = (Get-Date).ToString('yyyy-MM-dd HH:mm:ss')

# In -Columns (no -Type)
New-UDDataGridColumn -Field 'DateTime'
With the year first, sorting on that column stays in date order.

Text filters such as "starts with 2026-10" also work.

Filters that use a date picker, such as "is after" or "is before", will need the fix.

I will post an update in this thread once I have news from the team.

Best regards,

Patrick Ouimet