gcg-website/static/admin/previews/field-previews/date-preview.js
Denys Konovalov b66a27e3b9
All checks were successful
website-main / prod-build (push) Successful in 2m2s
website-main / test-build (push) Successful in 2m2s
website-main / auto-rebuild (push) Has been skipped
CMS refactor
2023-05-29 16:22:34 +02:00

14 lines
251 B
JavaScript

const DatePreview = ({ value }) =>
h(
"p",
{},
new Intl.DateTimeFormat("de-DE", {
year: "numeric",
month: "2-digit",
day: "2-digit",
hour12: false,
}).format(new Date(value))
);
export default DatePreview;