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