public function init() { $this->themeUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.assets.css.jui')); $this->theme = Yii::app()->params['juiTheme']; $this->language = Yii::app()->language; parent::init(); }
public function init() { parent::init(); $this->options = CMap::mergeArray($this->options,array( 'dateFormat'=>Yii::app()->getLocale()->getDateFormat('short'), 'changeMonth'=>true, 'changeYear'=>true, )); }
public function init() { parent::init(); $this->options = CMap::mergeArray($this->options, array( 'dateFormat'=>'yy-mm-dd', 'changeMonth'=>true, 'changeYear'=>true, 'showMonthAfterYear'=>false )); }
public function init() { if (!in_array($this->mode, array('date', 'time', 'datetime'))) { throw new CException('unknow mode "' . $this->mode . '"'); } if (!isset($this->language)) { $this->language = Yii::app()->getLanguage(); } return parent::init(); }
public function init() { if (!in_array($this->mode, array('date', 'time', 'datetime'))) { throw new CException('CJuiDatePicker unknown mode "' . $this->mode . '". Use time, datetime or date!'); } if (empty($this->language)) { $this->language = Yii::app()->language; } parent::init(); }
/** * Initialize widget. */ public function init() { if (!in_array($this->mode, array('date', 'time', 'datetime'))) { throw new CException('unknown mode "' . $this->mode . '"'); } if (!isset($this->language)) { $this->language = Yii::app()->getLanguage(); } // Overwrite options for time picker if ($this->mode === 'time') { $this->options = array_merge($this->options, $this->timeOptions); $this->htmlOptions = array_merge($this->htmlOptions, $this->timeHtmlOptions); } return parent::init(); }
public function init() { parent::init(); if (!in_array($this->row, array('vertical', 'horizontal'))) { $this->row = false; } $options = array('showAnim' => 'fold', 'dateFormat' => 'yy-mm-dd', 'changeMonth' => true, 'changeYear' => true, 'showOn' => 'both'); if (YdHelper::isMobileBrowser()) { $options['showOn'] = 'button'; $options['onClose'] = 'js:function(dateText, inst){$(this).attr("disabled", false);}'; $options['beforeShow'] = 'js:function(input, inst){$(this).attr("disabled", true);}'; } $this->options = CMap::mergeArray($options, $this->options); $this->htmlOptions = CMap::mergeArray(array('autocomplete' => 'off'), $this->htmlOptions); parent::init(); }
/** * Init widget */ public function init() { parent::init(); if (!in_array($this->mode, array('date', 'time', 'datetime'))) { throw new CException('EJuiDateTimePicker - unknown mode: "' . $this->mode . '". Use time, datetime or date!'); } if (empty($this->language)) { $this->language = str_replace('-', '_', strtolower(Yii::app()->language)); $parts = explode('_', $this->language); if (count($parts) == 2) { $this->language = $parts[0] . '-' . strtoupper($parts[1]); } if ($this->language == 'en-US') { $this->language = 'en'; } } if ($this->assetsPath === null) { $this->assetsPath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets'; } if ($this->assetsUrl === null) { $this->assetsUrl = Yii::app()->assetManager->publish($this->assetsPath); } }
public function init() { parent::init(); $this->registerAssets(); $this->registerTheme(); }
public function init() { $this->options = array('showAnim' => 'fold', 'dateFormat' => 'yy-mm-dd'); $this->htmlOptions = array('style' => 'height:20px;'); parent::init(); }