Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 完整日历(事件限制=真时,事件更改背景)_Jquery_Angularjs_Fullcalendar_Angular Ui - Fatal编程技术网

Jquery 完整日历(事件限制=真时,事件更改背景)

Jquery 完整日历(事件限制=真时,事件更改背景),jquery,angularjs,fullcalendar,angular-ui,Jquery,Angularjs,Fullcalendar,Angular Ui,当我有限制事件时,我不知道如何更改事件背景色(例如:我想用背景色绘制事件,我不想再使用文本“+2”) class fc more是包含事件的div 配置: $scope.uiConfig = { calendar: { firstDay:1, height: 'auto', editable: true, eventLimit: true,

当我有限制事件时,我不知道如何更改事件背景色(例如:我想用背景色绘制事件,我不想再使用文本“+2”)

class fc more
是包含事件的div

配置:

$scope.uiConfig = {
        calendar: {
            firstDay:1,
            height: 'auto',
            editable: true,

                eventLimit: true,
                 eventLimitText: "",


                            views: {
                                month: {
                                   eventLimit: 1
                                }},

            titleFormat: {
                     month: 'MMMM'
            },
            header: {
                left: 'prev',
                center: 'title',
                right: 'next'
            },
             eventRender:  function (event, element) {
                        element = angular.element('fc-more');
                element.css('background-color', 'yellow');
                debugger;
        if(event.color =="#3985AA")
        {
            element.css('background-color', '#3985AA');
        }
        if(event.color =="#43AF89")
        {
            element.css('background-color', '#43AF89');
        }
        if(event.color =="#FFC900")
        {
            element.css('background-color', '#FFC900');
        }

    },
HTTP Ajax

    $scope.eventSources = [

    ];
    ajax.sendApiRequest({}, "GET", "eventosusuario", false).then(function (response) {
        angular.forEach(response.data, function (evento) {
            evento.start = new Date(evento.fecha);
            evento.allDay = true;
            evento.end = new Date(evento.fecha);
            evento.title = evento.titulo;
            evento.color= "#3985AA";
            evento.textColor="#FFFFFF";
            evento.url="#/app/evento/"+evento.nid;

        })
        $scope.eventSources.push(response.data);

    }, function (error) {
        _showPopUp('error', 'error');
    });  

backgroundColor
是正确的属性,谢谢你的评论,但我不明白你的意思!!@RuhulAmin…..我在哪里更改了我的代码,请!!!我需要更改(+每种背景颜色增加2个文本)