I don’t want the month of a custom date field in an Embed to be abbreviated.
I’m using custom code in an Embed element because I am forced to hack around the lack of support for dynamic fields in custom attributes in order to reference a date for the <time> element’s datetime attribute.
The code below—originally copied from the HTML Embed Code Editor with fields and pasted into Notepad—does give me the rearranged with hyphens format that I want to see as the datetime value when I inspect with Chrome DevTools. But if I try to change the display instance from MMM DD, YYYY both values break/disappear.
I tried different date formats from the Internet to no avail, which I assume is my fault. However, it does seem buggy that I can successfully alter the format of the field in the element attribute, but not in the element content (even copying and pasting the exact same format/code).
This is definitely an issue. First, there should be a native element that allows for the auto definition of the datetime property and the innerHTML as well. Short of that the custom embed would work if you had the option to format the value of the date itself. I think you can change this with a text field, but there should be a way to do this in the embed field as well.
I was searching for a solution like this from a long time. Thanks a lot. Btw! Just can update… I think the variable names for published have changed. Here’s an update code for the same: