When I set the type of the form element to Zend \ Form \ Element \ Date, the view helper perfectly creates the HTML for the drop-down calendar. However, when I change it to Zend \ Form \ Element \ DateTime , I do not get only the time input, but the date input will return to the text input.
What is the easiest way to get an HTML DateTime form element done beautifully?
Form Element ...
<?php
....
$this->add(array(
'name' => 'dateTime',
'type' => 'Zend\Form\Element\DateTime',
));
Template...
<?php
....
echo $this->formrow( $form->get('dateTime') );
source
share