View Helpers

In This Article

FormDateTimeLocal

The FormDateTimeLocal view helper can be used to render a <input type="datetime-local"> HTML5 form input. It is meant to work with the DateTimeLocal element, which provides a default input specification for validating HTML5 datetime values.

FormDateTimeLocal extends from FormDateTime.

Basic usage

use Zend\Form\Element;

$element = new Element\DateTimeLocal('my-datetime');

// Within your view...

echo $this->formDateTimeLocal($element);
// Result: <input type="datetime-local" name="my-datetime" value="">

Found a mistake or want to contribute to the documentation? Edit this page on GitHub!