I'm using the multidate field plugin, which is excellent at presenting dates but I need to return entries based on testing the first date in there. I typically test with the entries loop, like so:
{% if product.dates.dates[0] | date('U') > now | date ('U') %}
but would prefer to only get entries fitting that criteria in the first place. Is there any way to fetch entries according to the first value in a an array like this?
{% set products = craft.commerce.products.dates(somehow only test the first value in the dates array here) %}
The field looks something like this:
dates [ // this is the custom field name
dates [ // this is the dates array within the custom field
[0] // this is the date object I want to test against
[1]
[2]
]
]