我想在“今日” View 中隐藏或删除一些小时,现在使用 minTime 和 maxTime 选项。
预期输出是小时范围 (7 至 12) (隐藏 13-14-16 小时行) (16 至 22)
$('#calendar').fullCalendar({
header: hdr,
buttonText: {
prev: '<i class="fa fa-chevron-left"></i>',
next: '<i class="fa fa-chevron-right"></i>'
},
minTime: "7:00",
maxTime: "23:00",
editable: true,
droppable: true
有什么学习的想法请...
最佳答案
这可能是一篇旧帖子,但仍然可以帮助某人
使用 viewRender 选项,您可以搜索表格并根据您使用的范围删除所述时间
viewRender: function(view, element) {
$(element).find('div.fc-slats table tr[data-time]').filter(function() {
var _t = jQuery(this).data('time');
/* Searches for the times that we don't want */
return ((_t >= '07:00' && _t <= '12:00') || (_t >= '16:00' && _t <= '22:00')) === false;
}).each(function() {
$(this).remove(); /* hide the unnecessary rows */
});
}
关于javascript - Jquery Fullcalendar 在“今天” View 中隐藏一些小时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31818714/