gpt4 book ai didi

jquery - 在 FullCalendar 中渲染时颜色未完全渲染

转载 作者:行者123 更新时间:2023-12-01 04:02:21 24 4
gpt4 key购买 nike

我想添加一整天的背景颜色,而不仅仅是事件背景。对于我现在编写的代码,我可以单独看到事件作为背景我的 View 代码如下:

<script>
$(document).ready(function() {

$('#calendar').fullCalendar({

utc: true,
header: {
left: 'prev,next today EventButton',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},

editable: false,
droppable: true,

eventSources: ["<?php echo base_url() ?>calendar/show_holidays"]

});
});
</script>
<style>
.event-full {
color:black;
vertical-align: middle !important;
text-align: center;
opacity: 1;
}

</style>

现在,我的 Controller 代码通过MVC如下:

public function show_holidays()
{

$holidays=$this->calendar_m->show_holidays();
foreach($holidays as &$val){
$val['allDay'] = 'true';
$val['Rendering'] = 'Background';
$val['textColor'] = '#000';
$val['title'] = 'Holiday today'
$val['backgroundColor'] = 'yellow';
}
echo json_encode($holidays);
}

最佳答案

Pass this parameters as json and check this should work for you.....

$event['id'] = $row->id;
$event['name'] = $row->name;
$event['date'] = $row->date;
$event['backgroundColor'] = '#1ab394';
$event['rendering'] = 'background';

关于jquery - 在 FullCalendar 中渲染时颜色未完全渲染,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38168963/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com