Display the date column output correctly in table when using JS toggle for Display date format
This commit is contained in:
parent
7f43705e7f
commit
030269f684
|
|
@ -291,10 +291,14 @@ class TableWidget extends BaseWidget<TableWidgetProps, WidgetState> {
|
|||
switch (type) {
|
||||
case ColumnTypes.DATE:
|
||||
let isValidDate = true;
|
||||
let outputFormat = column.metaProperties.format;
|
||||
let outputFormat = Array.isArray(column.metaProperties.format)
|
||||
? column.metaProperties.format[row]
|
||||
: column.metaProperties.format;
|
||||
let inputFormat;
|
||||
try {
|
||||
const type = column.metaProperties.inputFormat;
|
||||
const type = Array.isArray(column.metaProperties.inputFormat)
|
||||
? column.metaProperties.inputFormat[row]
|
||||
: column.metaProperties.inputFormat;
|
||||
if (type !== "Epoch" && type !== "Milliseconds") {
|
||||
inputFormat = type;
|
||||
moment(value, inputFormat);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user