On this page
Caution
The documentation you are viewing is for an older version of this component.
Switch to the latest (v3) version.
View Helpers
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 Laminas\Form\Element;
$element = new Element\DateTimeLocal('my-datetime');
// Within your view...
echo $this->formDateTimeLocal($element);
// Result: <input type="datetime-local" name="my-datetime" value="">