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) {
|
switch (type) {
|
||||||
case ColumnTypes.DATE:
|
case ColumnTypes.DATE:
|
||||||
let isValidDate = true;
|
let isValidDate = true;
|
||||||
let outputFormat = column.metaProperties.format;
|
let outputFormat = Array.isArray(column.metaProperties.format)
|
||||||
|
? column.metaProperties.format[row]
|
||||||
|
: column.metaProperties.format;
|
||||||
let inputFormat;
|
let inputFormat;
|
||||||
try {
|
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") {
|
if (type !== "Epoch" && type !== "Milliseconds") {
|
||||||
inputFormat = type;
|
inputFormat = type;
|
||||||
moment(value, inputFormat);
|
moment(value, inputFormat);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user