如何将完整日历中的月视图设置为仅在有事件时展开?

How to set Month View in Full Calendar to expand only if there is a event?

我为我的一个项目定制了 FullCalendar 插件,它看起来像这样 - month view。如您所见,空日期的高度与 date's with the Events 相同。我想要的是每月的星期视图 without any event day should be small. 我现在已经使用纵横比设置了天数的高度。请指导我。谢谢你的欢呼...

这是对我有用的答案,特别感谢@Adyson 的帮助和建议。

var calHeight = function() {
    $('#calendar').find('.fc-row').each(function() {
        var ogHeigth = '';
            if ($(this).find('.fc-event-container').length > '0') {
                ogHeigth = $(this).outerHeight();
            }
            if ($(this).find('.fc-event-container').length == '0') {
                $(this).css('height', ogHeigth - ogHeigth / 3);
            }
    });
}

我将这个函数放在完整日历中的所有函数中,以便在添加、更新或删除事件、更改日期等时运行它。它对我有用,希望这对你们有所帮助。泰