Can you elaborate more on what your mean by:
Can I, using the entered data (DyyMd), “reconstruct” it as yymmdd and use that in the get_posts function?
Basically, for the get_posts function to query or sort based on a date picker value, it must be a numeric value in the JS date_format of ‘yymmdd’. This may not be the answer you want to here, but it is the reality.
If you could change the format and re-save your posts, the the query will work.
There is a way to get the day of week from the format yymmdd.
If you have a look at the docs:
You will see that an example uses a create from format function and contains a modify function for the output. You can read up on the PHP docs for modify, but I know there is a string output which will get the day of week.
Hope that helps.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.