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
FormMonth
The FormMonth
view helper can be used to render an <input type="month">
HTML5 form input. It is meant to work with the Month element,
which provides a default input specification for validating HTML5 date values.
FormMonth
extends from FormDateTime.
Basic usage
use Laminas\Form\Element;
$element = new Element\Month('my-month');
// Within your view...
echo $this->formMonth($element);
// Result: <input type="month" name="my-month" value="">