public function run() { BowerAssets::register($this->getView()); $containerID = $this->inline ? $this->containerOptions['id'] : $this->options['id']; $this->getView()->registerJs("\n \$('#{$containerID}').parent().append('<div id=\\'yii2-date-picker-{$containerID}\\' class=\\'yii2-date-picker\\'><span></span></div>');\n \$('#{$containerID}').addClass('form-control').detach().appendTo('#yii2-date-picker-{$containerID}');\n "); parent::run(); }
public function run() { BowerAssets::register($this->getView()); $this->jsOption = \yii\helpers\Json::encode($this->jsOption); $this->getView()->registerJs("\$('#{$this->getId()}').highcharts({$this->jsOption});"); return \yii\helpers\Html::tag('div', '', \yii\helpers\ArrayHelper::merge($this->option, ['id' => $this->getId()])); }