So I know we can embed any CMS field via a dynamic embed. What about a CMS date field where time is important?
I’m creating a dynamic “add to calendar” button for an events collection where a starting and ending time, not just date, is associated with the event. I am using the add to calendar js found here: https://github.com/nwcell/ics.js?files=1. Works great, just can’t extract in the dynamic embed the start and end times - I can get the actual date just fine.
When referencing a CMS date field in the designer, not in a a dynamic embed, we can set the date format. How do we do this for a dynamic embed?
Thank you very much Alex! We have a page with events, some events starting on the same date at different times. How can we use your solution in our case?
Hey guys, I was seeing the same thing as Zeke8990 – the MM portion of the time is coming back with 04 instead of 00. Then I did some more digging and realized that “MM” is for the month, and “mm” (lowercase m’s) for the minutes.
However, now the time is coming through as 12-Hour time rather than 24-hour, so “A” must be added to the end of the time format - so it looks like this:
HH:mm A
Interesting, I will have to look into your “A” suggestion. I ended up having success with replacing the first "date" (not the second instance with a capital D) with datetime.