Skip to content

Commit

Permalink
Update yii2fullcalendar.php
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfrenzel authored Sep 23, 2016
1 parent e9bab1a commit 4b287f2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions yii2fullcalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ class yii2fullcalendar extends elWidget
*/
public $clientOptions = [
'weekends' => true,
//'default' => 'month',
'editable' => false,
];

public $defaultView = 'month';
/**
* @var string defaultView will define which view renderer will initially be used for displaying calendar events
*/
public $defaultView = 'month';

/**
* Holds an array of Event Objects
Expand Down Expand Up @@ -188,7 +190,7 @@ protected function registerPlugin()
$this->clientOptions['header'] = $this->header;
}

if(isset($this->defaultView))
if(isset($this->defaultView) && !isset($this->clientOptions['defaultView']))
{
$this->clientOptions['defaultView'] = $this->defaultView;
}
Expand Down

0 comments on commit 4b287f2

Please sign in to comment.