diff --git a/docs/widgets/services/customapi.md b/docs/widgets/services/customapi.md index 2834ea280..f39d8d5ea 100644 --- a/docs/widgets/services/customapi.md +++ b/docs/widgets/services/customapi.md @@ -35,6 +35,7 @@ widget: label: Field 4 format: date # optional - defaults to text dateStyle: long # optional - defaults to "long". Allowed values: `["full", "long", "medium", "short"]`. + timeStyle: medium # optional - Allowed values: `["full", "long", "medium", "short"]`. ``` Supported formats for the values are `text`, `number`, `float`, `percent`, `bytes`, `bitrate` and `date`. diff --git a/src/widgets/customapi/component.jsx b/src/widgets/customapi/component.jsx index a9e0890d4..fcf6e82f9 100644 --- a/src/widgets/customapi/component.jsx +++ b/src/widgets/customapi/component.jsx @@ -70,7 +70,7 @@ function formatValue(t, mapping, rawValue) { value = t("common.bitrate", { value }); break; case "date": - value = t("common.date", { value, dateStyle: mapping?.dateStyle ?? "long" }); + value = t("common.date", { value, dateStyle: mapping?.dateStyle ?? "long", timeStyle: mapping?.timeStyle }); break; case "text": default: