Hi Shane,
The code only works with the new post. It will automatically add the desired date to the post. But for existing post, if i clear the date, and save it again, it will not work anymore. The date picker will just show the empty date (attached is the old post after clearing the date and updating it).
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hello,
Thats because if the code has a date stored in the database it won't work.
This code is meant to work for posts without the date field already filled in. So if you were to remove date field value and save it wouldn't work because its detecting that their is a value for this field already there.
It only runs when the date field is empty.
I'm under the assumption that you only want this code to work when new posts are created to ensure that the dates are there.
Thanks,
Shane
Hi Shane,
It is helpful. Thank you for taking time..
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hello,
I hope i didn't come off as offensive in my previous response 🙁
Was I able to resolve the issue tho. Does it work as you want it to?
Please let me know.
Thanks,
Shane
Yes, It does help. Thank You very much.