Is it possible to dynamically set the width of the columns in full calendar vertical resource view?
问问题
4367 次
2 回答
1
我只是在css中设置了#calendar宽度。
所以如果我有这样的html代码:
<div id="content">
<div id="calendar"></div>
</div>
我像这样使用css:
#content
{
overflow-x: scroll;
}
#calendar
{
width: 3000px;
}
于 2018-05-01T09:01:04.153 回答
0
I did not change the actual cell width but because they stretch to fit the width of the entire scheduler, if you change the min-width of the entire scheduler you can make the cells change width.
I did this in viewRender
$("#schedule_container").css('min-width',$('.fc-resource-cell').length*125);
and eventAfterAllRender
$('.fc-agendaDay-button').click(function(){$("#schedule_container").css('min-width',$('.fc-resource-cell').length*125);});
This makes all of the text fit within each cell. The 125 was found after some testing to find a good size for me. You can play with that to have each one be wider or narrower
于 2016-09-02T17:27:44.797 回答