I've a form set up using Zend Framework 2 with an element type 'DateTimeLocal'
When I add a new record using the form all works well.
When I edit a record the form appears to fill out correctly: I've formatted the data to pass to the form using:
$this->startDate = (!empty($data['startDate'])) ? date("Y-m-d\TH:i:s",strtotime($data['startDate'])) : null;
and in the view add using:
echo $this->formRow($form->get('startDate'));
However when I go to submit the form having made edits, I get the message 'The input does not appear to be a valid date'. Using the chrome I re-enter the date, and it appears identical to what was pre-filled, but then submits fine.
html source rendered by zendframework is:
<label><span>Start Date</span><input type="datetime" name="startDate" value="2014-12-21T00:00:00"></label>
I'd have thought this was a common action but seam to be struggling to find examples.