public function datetimepicker($fieldName, array $options = [])
    {
        $options = optionsParser($options, ['data-date-format' => 'YYYY-MM-DD HH:mm', 'type' => 'text'])
            ->append('templates', [
                'input' => '<input type="{{type}}" name="{{name}}" class="form-control datetimepicker"{{attrs}}/>',
                'inputError' => '<input type="{{type}}" name="{{name}}" class="form-control datetimepicker is-invalid"{{attrs}}/>',
            ]);

        return $this->control($fieldName, $options->toArray());
    }
public function datetimepicker($fieldName, array $options = [])
    {
        $options = optionsParser($options, ['data-date-format' => 'YYYY-MM-DD HH:mm', 'type' => 'text'])
            ->append('templates', [
                'input' => '<input type="{{type}}" name="{{name}}" class="form-control datetimepicker"{{attrs}}/>',
                'inputError' => '<input type="{{type}}" name="{{name}}" class="form-control datetimepicker is-invalid"{{attrs}}/>',
            ]);

        return $this->control($fieldName, $options->toArray());
    }
public function datetimepicker ( $ fieldName , array $ options = [ ] ) { $ options = optionsParser ( $ options , [ 'data-date-format' => 'YYYY-MM-DD HH:mm' , 'type' => 'text' ] ) -> append ( 'templates' , [ 'input' => '<input type="{{type}}" name="{{name}}" class="form-control datetimepicker"{{attrs}}/>' , 'inputError' => '<input type="{{type}}" name="{{name}}" class="form-control datetimepicker is-invalid"{{attrs}}/>' , ] ) ; return $ this -> control ( $ fieldName , $ options -> toArray ( ) ) ; }
Creates a datetimepicker.

To add the scripts for datetimepicker, you should use the `LibraryHelper`.
@param string $fieldName Field name, should be "Modelname.fieldname"
@param array $options HTML attributes and options
@return string
@see MeTools\View\Helper\LibraryHelper::datetimepicker()
Creates a datetimepicker .