I am trying to get cakephp to generate the following HTML <div class="input date"><label>Leverdatum </label><select name="Leverdatum [day]">...</select><select name="Leverdatum [month]">...</select><select name="Leverdatum [year]">...</select></div> so that the order of inputting the date is day-month-year.
However cake is generating it in the order of year-day-month.
The code I'm using on my .ctp page is echo $this->Form->input('Leverdatum ', ['type' => 'date', 'default' => date("d-m-y", strtotime($orders->DELIVERYDATE))]); but this only fills in the correct date and doesn't order the select boxes the way I want them to.
I have found that in previous versions of cakePHP you could use 'dateFormat' => 'DMY' to achieve this. But this has apperantly been removed from cakePHP.
Now I did find a 'fix' which is to edit the cakePHP files at \Cake\View\Helper\FormHelper in protected $_defaultConfig change the variable 'dateWidget' => '{{year}}{{month}}{{day}}{{hour}}{{minute}}{{second}}{{meridian}}' to the order I want it in 'dateWidget' => '{{day}}{{month}}{{year}}{{hour}}{{minute}}{{second}}{{meridian}}'. But I don't really want to have to do this every time I want to update my cakePHP version.
My question is: Is there a way to tell cake what order I want my date to be in, aside from editting their source files?