getting this error
admin > date doesn't have a "condition" property. Conditions are used to conditionally show or hide fields depending on... some condition. You can't use them to set a field's value.
It sounds like what you want would be a beforeChange hook (relevant docs page:
https://payloadcms.com/docs/hooks/collections).
When the done field is modified, you can return a new value for the doneDate field inside the beforeChange hook
Worked. Thanks
Hi @anisulislampranto - Would you have an example of your updated code using the beforeChange hook? I am looking to do something similar.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.