diff --git a/apps/client/src/widgets/attribute_widgets/PromotedAttributesDisplay.tsx b/apps/client/src/widgets/attribute_widgets/PromotedAttributesDisplay.tsx
index 0d0b1c534..7552c3520 100644
--- a/apps/client/src/widgets/attribute_widgets/PromotedAttributesDisplay.tsx
+++ b/apps/client/src/widgets/attribute_widgets/PromotedAttributesDisplay.tsx
@@ -61,11 +61,15 @@ function formatLabelValue(attr: AttributeWithDefinitions): ComponentChildren {
}
return <>{attr.friendlyName}: {formattedValue}>;
case "date":
- case "datetime":
+ case "datetime": {
const date = new Date(value);
- if (isNaN(date.getTime())) return value;
- const timeFormat = attr.def.labelType === "datetime" ? "short" : "none";
+ const timeFormat = attr.def.labelType !== "date" ? "short" : "none";
return <>{attr.friendlyName}: {formatDateTime(date, "short", timeFormat)}>;
+ }
+ case "time": {
+ const date = new Date(`1970-01-01T${value}Z`);
+ return <>{attr.friendlyName}: {formatDateTime(date, "none", "short")}>;
+ }
case "boolean":
return <> {attr.friendlyName}>;
case "text":
@@ -81,7 +85,7 @@ function getAttributesWithDefinitions(note: FNote, attributesToIgnore: string[]
const def = attr.getDefinition();
const [ type, name ] = attr.name.split(":", 2);
const value = note.getLabelValue(name);
- const friendlyName = def?.promotedAlias ?? name;
+ const friendlyName = def?.promotedAlias || name;
if (!value) continue;
if (attributesToIgnore.includes(name)) continue;