node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

ui-table cannot display locale date/time

Open Steve-Mcl opened this issue 5 months ago • 3 comments

Current Behavior

Background

Using a table to display tabular data with timestamps is common practice. To render time in users local format, the processing must be done client side (or the server side needs awareness of the clients timezone & locale) When a timestamp (js/unix epoch) is sent to the table, there is no post processing possible (and no automatic detection and parsing)

Current Behaviour

  • Sending a column with js/unix epoch - renders a long number
  • Sending a column with Date object - renders UTC time

Expected Behavior

one or more of the following:

  • Set Columns
    • Column setup should have a datetime field setup with various formats and potentially moment style custom format
  • Auto Columns
    • Option to parse "date-like" numbers into locale datetime
    • Optional cell formatters (e.g. [{ col: "date": "dd-MMM-yyyy", {col: "time": "HH:mm"}])

Steps To Reproduce

No response

Environment

  • Dashboard version: 1.25.0
  • Node-RED version:
  • Node.js version:
  • npm version:
  • Platform/OS:
  • Browser:

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Steve-Mcl avatar Jul 21 '25 07:07 Steve-Mcl

Can the same argument be used to say that this should be available in a ui-text node?

colinl avatar Jul 21 '25 07:07 colinl

Can the same argument be used to say that this should be available in a ui-text node?

Quite likely yes - if a field/widget is populated from serverside (typically a UTC timestamp) then there needs to be a way to represent that in local units. So yes, as far as I am concerned 👍

Steve-Mcl avatar Jul 21 '25 10:07 Steve-Mcl

"date-like" numbers

This would be very vague. I feel like our only safe bet here is in the manual config of columns, adding a "Date/Time" option? The additional complexity is then how we let the user control the format of that cell - just showing year, just showing hours/minutes, etc.

joepavitt avatar Sep 19 '25 11:09 joepavitt