Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #698 from brandonbk/pass-date-format
Browse files Browse the repository at this point in the history
Pass through date format
  • Loading branch information
brandonbk authored Apr 28, 2023
2 parents 9fb94f8 + a418501 commit 2e9b3b0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ $ const withDates = defaultValue(input.withDates, true);
$ const withPrimarySectionModifier = defaultValue(input.withPrimarySectionModifier, true);
$ const displayButton = defaultValue(input.displayButton, false);
$ const callToAction = defaultValue(input.callToAction, "View Profile");
$ const dateFormat = defaultValue(input.dateFormat, "MMMM D, YYYY");

$ const isWebinar = content.type === "webinar";
$ const isPromotion = content.type === "promotion";
Expand Down Expand Up @@ -89,8 +90,8 @@ $ const withSponsored = primarySection && primarySection.name === 'Sponsored' &&
>
<if(content.startDate || content.endDate)>
<div class=`${blockName}__content-event-dates`>
<marko-web-content-start-date tag="span" block-name=blockName obj=content />
<marko-web-content-end-date tag="span" block-name=blockName obj=content />
<marko-web-content-start-date tag="span" block-name=blockName obj=content format=dateFormat />
<marko-web-content-end-date tag="span" block-name=blockName obj=content format=dateFormat />
</div>
</if>
<if(isWebinar && content.linkUrl)>
Expand Down Expand Up @@ -134,7 +135,7 @@ $ const withSponsored = primarySection && primarySection.name === 'Sponsored' &&
<attribution ...input.attribution content=content />
</@text>
<@text|{ blockName }| show=(Boolean(withDates && !isEvent))>
<marko-web-content-published block-name=blockName obj=content format="MMMM D, YYYY" />
<marko-web-content-published block-name=blockName obj=content format=dateFormat />
</@text>
<@text show=displayButton>
<marko-web-link
Expand Down

0 comments on commit 2e9b3b0

Please sign in to comment.