我有一个完整日历 ListView 。
View 中的所有条目将始终是“全天”事件。因此,我真的不需要出现在左栏中的“全天”。有没有办法从列表中删除它?
$(document).ready(
function() {
var calendarEl = document.getElementById('date_list');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'list' ],
defaultView: 'listThirtyDay',
height: 'auto',
views: {
listThirtyDay: {
type: 'list',
duration: { days: 30 },
buttonText: '30 days'
},
listDay: { buttonText: 'Day' },
listWeek: { buttonText: 'Week' }
},
header: {
left: 'prev,next',
center: 'title',
right: 'listDay,listWeek,listThirtyDay',
},
time: false,
eventSources: [
{
url: $('.KeyDatesURL').val()
}
]
});
calendar.render();
}
);
最佳答案
如果您使用浏览器的开发人员工具检查呈现的 HTML 元素,您将看到 ListView 中的时间文本保存在具有“fc-list-item-time”类的 HTML 元素中。
因此,您可以设置一个简单的 CSS 规则来隐藏它:
.fc-list-item-time {
display:none;
}
现场演示:https://codepen.io/ADyson82/pen/GRJByop
关于javascript - FullCalendar ListView - 如何隐藏 "all-day",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60771511/