question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CURRENT_DATETIME in metafields

See original GitHub issue

Hi! 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:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dereklieucommented, Jun 16, 2016

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 a placeholder 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.

0reactions
dycommented, Jun 16, 2016

@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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found