简体   繁体   English

FullCalendar事件没有events缩

[英]FullCalendar not events curl up

Why are my full calendar event does not curl up. 为什么我的完整日历活动没有结束。 If I have more than three events should curl up and show at the bottom of the "more events". 如果我有三个以上的事件,应该缩进并显示在“更多事件”的底部。 FullCalendar downloaded from the repository adesigns / calendar-bundle. 从存储库adesigns / calendar-bundle下载FullCalendar。 I have this: 我有这个:

在此处输入图片说明

I need this: 我需要这个:

在此处输入图片说明

This is my code.I added a piece of code at the end of the function but is not working: 这是我的代码。我在函数末尾添加了一段代码,但无法正常工作:

$(document).ready(function () {
        $(function () {
            var date = new Date();
            var d = date.getDate();
            var m = date.getMonth();
            var y = date.getFullYear();

            $('#calendar-holder').fullCalendar({


                header: {
                    left: 'prev, next',
                    center: 'title',
                    right: 'month, agendaWeek, agendaDay, add_event'
                },
                lazyFetching: true,
                timeFormat: {
                    // for agendaWeek and agendaDay
                    agenda: 'H:mm', // 5:00 - 6:30

                    // for all other views
                    '': 'H:mm'         // 7p
                },
                eventSources: [
                    {

                        url: Routing.generate('fullcalendar_loader'),
                        type: 'POST',

                        // A way to add custom filters to your event listeners
                        data: {
                        },
                        error: function () {
                            //alert('There was an error while fetching Google Calendar!');
                        }
                    }
                ],
                monthNames: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'],
                monthNamesShort: ['Sty', 'Luty', 'Marz', 'Kwie', 'Maj', 'Czer', 'Lip', 'Sier', 'Wrze', 'Paź', 'Lis', 'Gru'],
                dayNames: ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'],
                dayNamesShort: ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'],
                buttonText: {
                    month: 'Miesiąc',
                    week: 'Tydzień',
                    day: 'Dzień'
                },
                eventLimit: true, 
                views: {
                    agenda: {
                        eventLimit: 3 
                     }
                },
            });
        });

So, I never heard of the plugin, I googled for the documentations, I opened the documentation and this was the first page I found that resembled your problem: https://fullcalendar.io/docs/display/eventLimit/ 所以,我从没听说过插件,我在Google上搜索了文档,打开了文档,这是我发现的第一个类似于您的问题的页面: https : //fullcalendar.io/docs/display/eventLimit/

You need to add an event limit to your options that limit the amount of events on a day. 您需要在选项中添加事件限制,以限制一天中的事件数量。 Like so: 像这样:

$('#calendar').fullCalendar({
    eventLimit: true, // for all non-agenda views
    views: {
        agenda: {
            eventLimit: 6 // adjust to 6 only for agendaWeek/agendaDay
        }
    }
});

If this does not solve your problem, please post the javascript code you are using. 如果这样做不能解决您的问题,请发布您正在使用的javascript代码。 If this did solve your problem, please read the docs of this plugin before asking questions about it here. 如果确实能解决您的问题,请先阅读此插件的文档,然后再在此处提出问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM