Home › Forums › Add-ons › Repeater Field › Filter Repeater row by Date Field › Reply To: Filter Repeater row by Date Field
Hi,
I think your issue is that your format is not supported by strtotime.
Try changing the if to:
<?php if ( strtotime( $today ) <= strtotime( get_sub_field( 'date', false ) ) ) { ?>
The second parameter of get_sub_field will return the date unformatted in the way it is saved by ACF (which is Y-m-d H:i:s) and will work with strtotime.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.