function render() { $this->Page->registerClientScript('controls'); $this->renderJs(); $contents = parent::render(); $panel = $this->createComponent('TPanel', self::RESULT_PANEL_ID); $panel->setCssClass($this->getResultCssClass()); $contents .= $panel->render(); return $contents; }
/** * Renders body content. * This method overrides parent implementation by adding * additional date picker button if Mode is Button or ImageButton. * @param THtmlWriter writer */ public function render($writer) { if ($this->getInputMode() == TDatePickerInputMode::TextBox) { parent::render($writer); $this->renderDatePickerButtons($writer); } else { $this->renderDropDownListCalendar($writer); if ($this->hasDayPattern()) { $this->renderClientControlScript($writer); $this->renderDatePickerButtons($writer); } } }
/** * Renders the datepicker * @return string the rendering result */ public function render() { if ($this->isShowCalendar()) { $id = $this->getClientID(); $format = $this->getDateFormat(); $showTime = $this->isShowTime() ? 'true' : 'false'; $script = "\nCalendar.setup({\n\tinputField:\"{$id}\",\n\tifFormat:\"{$format}\",\n\tshowsTime:{$showTime},\n\ttimeFormat:\"24\",\n\teventName:\"focus\"\n});\n"; $this->Page->registerEndScript($id, $script); } return parent::render(); }