Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 /**
  * 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);
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * 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();
 }