fullcalendar - 仅在 dayGridMonth 中显示描述
问题描述
我需要使用extendedProps,但是当我尝试在timeGridWeek 或timeGridDay 中显示info.event.extendedProps.description 时,它不会(它说“未定义”),仅在dayGridMonth 中。我已阅读文档,但我不知道如何显示这些非标准属性。
事件显示正确。
(对不起我糟糕的英语)
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: [ 'dayGrid', 'interaction', 'bootstrap', 'timeGrid', 'rrule' ],
height: 'parent',
header: {
left: 'prev,next today',
center: 'title',
right: 'timeGridDay,timeGridWeek,dayGridMonth'
},
titleFormat: {
year: 'numeric',
month: 'long',
day: '2-digit'
},
defaultView: 'timeGridWeek',
themeSystem: 'bootstrap',
selectable: true,
editable: true,
navLinks: true,
weekNumbers: true,
nowIndicator: true,
locale: 'es',
minTime: '08:00:00',
maxTime: '22:00:00',
weekends: false,
eventOrder : 'color',
eventSources: [
'carga_citas.php',
'carga_sesiones.php'
],
eventClick: function(info) {
alert(info.event.extendedProps.description);
}
});
calendar.render();
});
</script>
感谢您的回复。
解决方案
推荐阅读
- postgresql - PSQLException: 此连接已关闭
- c# - SignalR Hub OnDisconnectedAsync 方法在 Blazor 服务器中未命中
- python - 如何使用 kivy 或 kivyMD 覆盖 android 屏幕?
- node.js - socketio express 中的 Cors 政策
- ansible - 使用带有 Ansible 的 Jinja2 过滤器格式化字符串列表
- java - 使用 Jackson 解析 JSON 时无法识别的字段
- javascript - 当使用具有属性 role = textbox 和 contenteditable=true 的跨度时。然后在其中复制粘贴文本,无法正常工作
- excel - 打开从 SAP 中提取的 excel 文件
- php - Laravel 调试栏不显示
- powershell - Powershell 克隆对象 ArrayList