diff --git a/CoreAsset.php b/CoreAsset.php index 2ce2f7b..2b2daf0 100644 --- a/CoreAsset.php +++ b/CoreAsset.php @@ -71,7 +71,7 @@ public function registerAssetFiles($view) $language = $this->language ? $this->language : Yii::$app->language; if (strtoupper($language) != 'EN-US') { - $this->js[] = "lang/{$language}.js"; + $this->js[] = "locale/{$language}.js"; } if($this->googleCalendar) diff --git a/yii2fullcalendar.php b/yii2fullcalendar.php index e0695a9..2643253 100644 --- a/yii2fullcalendar.php +++ b/yii2fullcalendar.php @@ -39,9 +39,11 @@ class yii2fullcalendar extends elWidget */ public $clientOptions = [ 'weekends' => true, - 'default' => 'month', + //'default' => 'month', 'editable' => false, ]; + + public $defaultView = 'month'; /** * Holds an array of Event Objects @@ -185,6 +187,11 @@ protected function registerPlugin() } else { $this->clientOptions['header'] = $this->header; } + + if(isset($this->defaultView)) + { + $this->clientOptions['defaultView'] = $this->defaultView; + } // clear existing calendar display before rendering new fullcalendar instance // this step is important when using the fullcalendar widget with pjax