Format keys in Element API plugin 'criteria' =&gt; [
    'section' =&gt; 'news',
    'date' =&gt; craft()-&gt;request-&gt;getPost('date')
],


How to make that worked like this:

'criteria' =&gt; [
    'section' =&gt; 'news',
    'date-&gt;format("Y-m-d")' =&gt; craft()-&gt;request-&gt;getPost('date')
],
Something like this should work just for selecting a "day".

'criteria' =&gt; [
    'section' =&gt; 'news',
    'customDateFieldHandle' =&gt; ['and', '&gt;='.DateTime::createFromString(craft()-&gt;request-&gt;getPost('date'))-&gt;format("Y-m-d").' 00:00:00', '&lt;='.$DateTime::createFromString(craft()-&gt;request-&gt;getPost('date'))-&gt;format("Y-m-d").' 23:59:59')];
],