What is the proper syntax in the ElementAPI 'criteria' configuration settings for limiting entries based on custom start and end date/time fields. I can't use the default postDate and expiryDate due to localization requirements.
I have the proper syntax working in my twig template:
.startDateTime('<=' ~ now.date,':empty:').endDateTime('>=' ~ now.date,':empty:')
How can I mimic this same logic in the ElementAPI config settings? This is what I have so far. It doesn't throw any php errors but doesn't return the results I am expecting:
'criteria' => [ 'section' => 'mySection', 'type' => 'mySectionType', 'startDateTime' => '<=' . date("Y-m-d H:i:s") . ', :empty:', 'endDateTime' => '>=' . date("Y-m-d H:i:s") . ', :empty: ' ],