Nextras\Forms\Controls\DateTimePickerPrototype::getControl PHP Метод

getControl() публичный Метод

Generates control's HTML element.
public getControl ( ) : Nette\Utils\Html
Результат Nette\Utils\Html
    public function getControl()
    {
        $control = parent::getControl();
        $control->type = $this->htmlType;
        $control->addClass($this->htmlType);
        $control->{'data-nette-rules'} = null;
        list($min, $max) = $this->extractRangeRule($this->getRules());
        if ($min instanceof DateTime) {
            $control->min = $min->format($this->htmlFormat);
        }
        if ($max instanceof DateTime) {
            $control->max = $max->format($this->htmlFormat);
        }
        $value = $this->getValue();
        if ($value instanceof DateTime) {
            $control->value = $value->format($this->htmlFormat);
        }
        return $control;
    }