I’m using the ACF Multi Dates Field plugin with ACF to allow user to select multiple dates for an event. I need to compare the return value of the multi date plugin to the current days date. But the return value is an array array(1) { [0]=> string(10) "2021-09-30" }
.
Is there a way to compare the date array to todays date in the query?
Here’s my code. The multi date field name is event_date
.
$args = array (
'post_type' => array( 'events' ),
'posts_per_page' => -1,
'author_name' => $current_user->user_nicename,
'orderby' => 'meta_value',
'order' => 'ASC',
'meta_key' => 'event_date',
'meta_query' => array(
array(
'key' => 'event_date',
'compare' => '>=',
'value' => $date_now,
'type' => 'DATE',
)
),
);