ui-table cannot display locale date/time
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
Can the same argument be used to say that this should be available in a ui-text node?
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 👍
"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.