Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hidden date widget that returns the current date #1270

Closed
ghost opened this issue Apr 15, 2018 · 5 comments
Closed

Add hidden date widget that returns the current date #1270

ghost opened this issue Apr 15, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Apr 15, 2018

- Do you want to request a feature or report a bug?
Feature

- What is the expected behavior?

Please add hidden functionality to the date widget so that the date of creating the post can be returned without bothering the user.

@ghost ghost changed the title Add hidden date widget that outputs the current date Add hidden date widget that returns the current date Apr 15, 2018
@erquhart
Copy link
Contributor

This centers around something that sort of happened by mistake imo - the date widget provides a default value that can only be generated by the widget control component while rendered in the editor - we need some way for this to work when hidden.

@johnpuddephatt
Copy link

I have the same need – to store the post creation date on the post. Working locally with eleventy I was relying on file creation dates which it will work with but I came across problems they highlight as a common pitfall when working with Netlify – post creation dates end up out of order.

I did think I could just add a datetime widget that defaults to the current time and assume this won't be altered by the author.

However I need the time to be quite accurate (time not just date) and using a datetime widget the time is when the create new post page is opened, not when the post is created.

@henval2020
Copy link

any update on this feature/request? I'm having the same need as this one.

@erezrokah
Copy link
Contributor

Hi @henval2020, the best way to move this forward is a contribution.

As a workaround I think one could use the preSave event to manage dates (add an additional key value to the entry with the creation date if doesn't exist, or assume it's an existing entry if it does exist).

@martinjagodic
Copy link
Member

This can be achieved with custom widgets, so I'm closing this as not planned.

@martinjagodic martinjagodic closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants