diff --git a/packages/post-type-event/includes/post-types/start.njk b/packages/post-type-event/includes/post-types/start.njk index 79c01b696..f60af858a 100644 --- a/packages/post-type-event/includes/post-types/start.njk +++ b/packages/post-type-event/includes/post-types/start.njk @@ -1,5 +1,7 @@ {%- set startFormat = "PPp" if property | includes("T") else "PP" -%} -{%- set endFormat = "PPp" if properties.end | includes("T") else "PP" -%} +{%- if properties.end -%} + {%- set endFormat = "PPp" if properties.end | includes("T") else "PP" -%} +{%- endif -%} {%- set html -%} {{ icon("event") }} {{- property | date(startFormat, { locale: opts.locale, timeZone: application.timeZone }) -}}