StatPanel: Fixes issue formatting date values using unit option (#30979)

This commit is contained in:
Torkel Ödegaard
2021-02-08 15:30:20 +01:00
committed by GitHub
parent 549a2bab3b
commit 907d3a2aac
2 changed files with 4 additions and 3 deletions
@@ -27,9 +27,10 @@ interface DisplayProcessorOptions {
// Reasonable units for time
const timeFormats: KeyValue<boolean> = {
dateTimeAsIso: true,
dateTimeAsIsoSmart: true,
dateTimeAsIsoNoDateIfToday: true,
dateTimeAsUS: true,
dateTimeAsUSSmart: true,
dateTimeAsUSNoDateIfToday: true,
dateTimeAsLocal: true,
dateTimeFromNow: true,
};
@@ -77,7 +77,7 @@ export const getStandardFieldConfigs = () => {
placeholder: 'none',
},
shouldApply: (field) => field.type === FieldType.number,
shouldApply: () => true,
category,
};