18 Yii::import(
'booster.widgets.TbBaseInputWidget');
65 public function run() {
67 if ($this->selector) {
68 $this->
registerScript($this->selector, $this->options, $this->callback);
70 list($name, $id) = $this->resolveNameID();
72 if ($this->hasModel()) {
74 echo $this->form->textField($this->model, $this->attribute, $this->htmlOptions);
76 echo CHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
80 echo CHtml::textField($name, $this->
value, $this->htmlOptions);
91 Yii::app()->clientScript->registerScript(
92 uniqid(__CLASS__ .
'#',
true),
94 ?
', ' . CJavaScript::encode(
$callback) :
'') .
');'
118 if (empty($this->options[
'locale'][
'daysOfWeek'])) {
119 $this->options[
'locale'][
'daysOfWeek'] = Yii::app()->locale->getWeekDayNames(
'narrow',
true);
128 if (empty($this->options[
'locale'][
'monthNames'])) {
129 $this->options[
'locale'][
'monthNames'] = array_values(
130 Yii::app()->locale->getMonthNames(
'wide',
true)
143 $booster->registerAssetCss(
'bootstrap-daterangepicker.css');
144 $booster->registerAssetJs(
'bootstrap.daterangepicker.js');
145 $booster->registerPackage(
'moment');