Added "locale" option to the date format of the customapi
This commit is contained in:
parent
1f905bc241
commit
80c5761af4
@ -34,6 +34,7 @@ widget:
|
||||
- field: key # needs to be YAML string or object
|
||||
label: Field 4
|
||||
format: date # optional - defaults to text
|
||||
locale: nl # optional
|
||||
dateStyle: long # optional - defaults to "long". Allowed values: `["full", "long", "medium", "short"]`.
|
||||
timeStyle: medium # optional - Allowed values: `["full", "long", "medium", "short"]`.
|
||||
```
|
||||
|
||||
@ -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", timeStyle: mapping?.timeStyle });
|
||||
value = t("common.date", { value, lng: mapping?.locale, dateStyle: mapping?.dateStyle ?? "long", timeStyle: mapping?.timeStyle });
|
||||
break;
|
||||
case "text":
|
||||
default:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user