I have an animated text that needs to be displayed based on date condition. I have a custom field name **Grant final closing date ** in toolset that will be compared with today date.
Text will be displayed when** Grant final closing date is < Today && grant final closing filed is not empty.
grant closing date format have : May 2, 2023
I gave the dynamic condition in condition settings in dynamic.ooo condition settings selecting wpcf-grant-closing-date < [date|F j, Y] & wpcf-grant-closing-date have any value.
But nothing is working as expected. I tried with various date format combination and also i tried with custom condition
global $post;
$grantFinalClosingDate = get_post_meta(get_the_id(),'wpcf-grant-final-closing-date', true);
// Get the current date
$today = date('F j, Y');
// Compare the two dates
if (strtotime($grantFinalClosingDate) < strtotime($today)) {
return true;
} else {
return false;
}```
Please guide me how to resolve this issue.
Thanks in advance