public function month($fieldName, array $options = [])
    {
        $options = $this->_singleDatetime($options, 'month');

        if (isset($options['val']) && $options['val'] > 0 && $options['val'] <= 12) {
            $options['val'] = [
                'year' => date('Y'),
                'month' => (int)$options['val'],
                'day' => date('d')
            ];
        }

        return $this->dateTime($fieldName, $options);
    }
public function month($fieldName, array $options = [])
    {
        $options = $this->_singleDatetime($options, 'month');

        if (isset($options['val']) && $options['val'] > 0 && $options['val'] <= 12) {
            $options['val'] = [
                'year' => date('Y'),
                'month' => (int)$options['val'],
                'day' => date('d')
            ];
        }

        return $this->dateTime($fieldName, $options);
    }
public function month ( $ fieldName , array $ options = [ ] ) { $ options = $ this -> _singleDatetime ( $ options , 'month' ) ; if ( isset ( $ options [ 'val' ] ) && $ options [ 'val' ] > 0 && $ options [ 'val' ] <= 12 ) { $ options [ 'val' ] = [ 'year' => date ( 'Y' ) , 'month' => ( int ) $ options [ 'val' ] , 'day' => date ( 'd' ) ] ; } return $ this -> dateTime ( $ fieldName , $ options ) ; }
Returns a SELECT element for months.

### Options:

- `monthNames` - If false, 2 digit numbers will be used instead of text.
If an array, the given array will be used.
- `empty` - If true, the empty select option is shown. If a string,
that string is displayed as the empty element.
- `value` The selected value of the input.

@param string $fieldName Prefix name for the SELECT element
@param array $options Attributes for the select element
@return string A generated month select dropdown.
@link https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-month-inputs
Returns a SELECT element for months .