Skip to content

Commit

Permalink
Merge pull request #60 from almix/master
Browse files Browse the repository at this point in the history
'locale' changed in 3.0 from 'lang'. 'lang' became deprecated
  • Loading branch information
philippfrenzel authored Sep 14, 2016
2 parents e7ff9a4 + f86623b commit 5a5320d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CoreAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 8 additions & 1 deletion yii2fullcalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5a5320d

Please sign in to comment.