CURRENT_DATETIME in metafields
See original GitHub issueHi! I’m having the config:
prose:
metadata:
- name: "when"
field:
element: "text"
label: "When"
help: "The date of the event"
placeholder: CURRENT_DATETIME
type: "datetime"
but it does not insert the date, instead just outputs CURRENT_DATETIME
text.
Is there anything I can do about it?
Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Solved: Current date with Metafield for Product Page
Solved: Hi, I'm using the new Sense Theme and I'm trying to show the text "Free Shipping until (current date/today's date)" using metafields...
Read more >Using the #Date and Time Metafield in a #Shopify Theme
In this video I walkthrough adding the date and time metafield in Shopify and coding it to display in a theme.
Read more >Date comparison Logic / in Liquid Template Filter
I'm attempting to create a "Pre-Order" Like mechanic where certain elements of my Shopify Liquid Template only show if the current date is...
Read more >Collect Formula Building – Meta Fields - EarthSoft
Meta fields are fields associated to the entire form template and have values that ... Current date/time at the creation of the form...
Read more >Catalog product search (Commerce 8) - Optimizely World
Browsing catalogs and categories; Performing site-wide searches by keywords; Guided search; Browsing by brand, price and any other meta fields ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m glad you can use this, even though I understand it’s not your preferred solution. At this point I don’t think we will move forward with this feature, and I’ve clarified the documentation to say that CURRENT_DATETIME is meant to be a
value
and not aplaceholder
so hopefully that clears the confusion for future users.My thinking is that the CURRENT_DATETIME variable is really better suited to provide the date of creation to parsers and other machines, and not well-suited for humans to enter a date, since ISO is a weird format that’s easy to get wrong. For that, again, I think a dedicated date meta field serves the purpose better.
@dereklieu thank you for the solution, that is nice, I will use that. But I would recomment to look at the issue also as a bug-report or a request whether it is a bug or feature, as far there is no certainty about it 😃