New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Required Date/Time field validation error on save

Oskar Kozak March 31, 2021 by Oskar Kozak


Just wanted to say that I'm enjoying the experience with statamic so far, great work people!

I have an issue with a required date time field I created as a workaround to a lack of published/created date on entries which I need to sort programatically based on when they were created. Normally, I would just order on an autoincremented ID field but that's not there either :small-eye-roll:

So, to make sure the user always provides a published date on their entries, I created a date field which luckily defaults to "now" but it seems like the default provided is perhaps just the datepicker js (moment?) adding the value and the field is not "detected" as having value provided unless you specifically select a pre-selected date in the datepicker. Is that by design or is that something that could potentially be resolved?

Not critical, probably a feature request but it's an annoying one to be honest.


>>>>>>> Unanswered <<<<<<<
1 Reply