css - yii2 fullcalendar month background color -
i have following yii2fullcalendar philippfrenzel:
<?= yii2fullcalendar\yii2fullcalendar::widget([ 'clientoptions' => [ 'height' => 'auto', 'defaultview' => 'basic', 'visiblerange' => [ 'start' => '2017-06', 'end' => '2017-10', ], ], 'ajaxevents' => url::to(['/makl/jsoncalendar']) ]); ?>
it's quite good, thing disturbs me little bit every cell white , can't know new month starting. can change background color of weekend days , months? e.g. first month can white, new month begins different color, 3rd month white again, 4th month colored again etc. until haven't found relevant solution that, , i'm afraid maybe doesn't exist. or maybe creating 1 month event...? i've tried way, unfortunately it's not working:
$this->registerjs(" var newevent = new object(); newevent.start = '2017-07-01 00:00:00'; newevent.end = '2017-07-31 23:59:59'; newevent.allday = true; newevent.rendering = 'background'; newevent.backgroundcolor = 'red'; $('#calendar').fullcalendar('renderevent', newevent, true); ");
and way in controller:
$eventbgcolorjuly = new \yii2fullcalendar\models\event(); $eventbgcolorjuly->id = $time->id; $eventbgcolorjuly->title = $time->profile_name; $eventbgcolorjuly->start = date('y-m-d\th:i:s\z', strtotime('2017-07-01 00:00:00')); $eventbgcolorjuly->end = date('y-m-d\th:i:s\z', strtotime('2017-07-31 23:59:59')); $eventbgcolorjuly->allday = true; $eventbgcolorjuly->rendering = 'background'; $eventbgcolorjuly->backgroundcolor = 'red'; $events[] = $eventbgcolorjuly;
but events gone. can please point me right direction? many thanks!
Comments
Post a Comment