public function createChildControls() { $m = new TTextBox(); $m->setId($this->_filterId ? $this->_filterId : $this->genFilterId()); $this->getControls()->add($m); $vali = new TDataTypeValidator(); $vali->setEnableClientScript(true); $vali->setDisplay('Dynamic'); $vali->setControlToValidate($m->getId()); $vali->setDataType('Date'); $vali->setDateFormat($this->_dateFormat); $vali->setText(Prado::localize('Wrong date format')); $this->createLabel($m->getId()); $this->getControls()->add($vali); $this->_control = $m; }
protected function createTypeValidator($container, $column, $record) { $val = new TDataTypeValidator(); $val->setControlCssClass('required-input2'); $val->setCssClass('required'); $val->setControlToValidate(self::DEFAULT_ID); $val->setValidationGroup($this->getParent()->getValidationGroup()); $val->setDisplay(TValidatorDisplayStyle::Dynamic); $container->Controls[] = $val; return $val; }