Answer the question
In order to leave comments, you need to log in
How to add custom variables to yii2fullcalendar?
There is an excellent extension "philippfrenzel/yii2fullcalendar", but it has its own variables, but you need to make an event with a bunch of fields, and when you add your own fields, it swears that it does not know such ...
How to add your own fields to this extension? Well, not only this, because the procedure is identical for all extensions :)
Answer the question
In order to leave comments, you need to log in
Redefine the class and those methods and properties that work with your properties
An example as I did a long time ago:
namespace backend\widgets;
class yii2fullcalendar extends \yii2fullcalendar\yii2fullcalendar
{
// Property 'contentHeight' absent in yii2fullcalendar
// because add public property, add default value 'auto' and define registerPlugin
public $contentHeight = 'auto';
protected function registerPlugin()
{
if(isset($this->contentHeight) && !isset($this->clientOptions['contentHeight']))
{
$this->clientOptions['contentHeight'] = $this->contentHeight;
}
parent::registerPlugin();
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question