I want to get only entries with a specific date. I created a date field customDateField
. It has the following code:
{% set entries = craft.entries.section('orders').customDateField('2016-04-14') %}
but this not work. How it will look in php?
In element api plugin i was code:
'endpoints' => [
'orders.json' => [
'elementType' => 'Entry',
'criteria' => [
'section' => 'orders',
'date' => '>='.craft()->request->getPost('date')
],
'transformer' => function(EntryModel $entry) {
return [
'id' => $entry->id,
];
},
],
]
but it only shows a larger date of entries, need to write 'date->format("Y-m-d")'