0

我想知道是否有一种很好的方法来定位FullCalendar事件,就好像它们向左浮动一样。在可用的水平空间被填满后,它们将垂直堆叠。这看起来没问题,因为事件也将限制为10px x 10px.

我知道我需要更改left:top:CSS 属性。

而不是看起来像这样:

======== ->活动
======== ->活动

它看起来像这样:

[--] [--] -> 事件 ^ 事件

我在哪里可以在 FullCalendar.js 中进行更改?

4

2 回答 2

0

需要修改函数renderSlotSegs;编码:

if (levelI) {
    // indented and thin
    outerWidth = availWidth / (levelI + forward + 1);
}else{
    if (forward) {
        // moderately wide, aligned left still
        outerWidth = ((availWidth / (forward + 1)) - (12/2)) * 2; // 12 is the predicted width of resizer =
    }else{
        // can be entire width, aligned left
        outerWidth = availWidth;
    }
}

应改为:

if (levelI) {
    // indented and thin
    outerWidth = availWidth / (levelI + forward + 1);
}else{
    if (forward) {
        // changed to limit width of first overlapping slot
        outerWidth = availWidth / (forward + 1);
    }else{
        // can be entire width, aligned left
        outerWidth = availWidth;
    }
}
于 2013-04-23T04:09:34.893 回答
0

In .min version near var R,V=la+"-widget-header",ea=la+"-widget-content" you have the following code:

R="<table class='fc-border-separate' style='width:100%' cellspacing='0'><thead><tr>";for(aa=0;aa<F;aa++)R+="<th class='fc- "+V+"'/>";R+="</tr></thead><tbody>";for(aa=0;aa<w;aa++){R+="<tr class='fc-week"+aa+"'>";for(V=0;V<F;V++)R+="<td class='fc- "+ea+" fc-day"+(aa*F+V)+"'><div>"+(I?"<div class='fc-day-number'/>":"")+"<div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></div></td>";R+="</tr>"}R+="</tbody></table>";

Did you try to edit this part.

Worked for me a few months ago.

于 2013-02-27T17:11:30.620 回答