events - 全日历单槽事件结束时间

标签 events time fullcalendar

我在议程周 View 中使用全日历。我注意到单个时段中的事件(例如 30 分钟)不会显示结束时间。结束时间仅出现在覆盖多个时段的事件上。 我找到的所有选项都没有将其添加到事件标题中。

这可能吗,只是我没看到? 感谢您的任何建议!

编辑: 这就是我指的工具。 http://fullcalendar.io/

最佳答案

在函数 renderEventTable 中,有一个条件,如果事件小于 30px,则添加 css 类。

if (seg.bottom - seg.top < 30) {
    seg.el.addClass('fc-short');
}

所以基本上您只需编辑 .fc-short 的 CSS 样式即可。

fc-time-grid-event.fc-short .fc-time span {
    display: none; /* don't display the full time text... */
}

.fc-time-grid-event.fc-short .fc-time:before {
    content: attr(data-start); /* ...instead, display only the start time */
}

.fc-time-grid-event.fc-short .fc-time:after {
    content: "\000A0-\000A0"; /* seperate with a dash, wrapped in nbsp's */
}

关于events - 全日历单槽事件结束时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26348955/

相关文章:

javascript - 如何在 FullCalendar 中保持不同长度事件的一致排序?

c# - 在 C# (WinForms) 中拦截应用程序中所有控件的点击事件

c - 为什么 C struct tm (time.h) 返回错误的月份?

javascript - 拖动事件时如何禁用弹出窗口?

javascript - 如何在 FullCalendar 中使用外部元素获取 drop 和 eventDrop 的结束时间?

c++ - 从时间生成 'random' 数字?

javascript - jQuery 防止 anchor 击

c# - 恢复窗口时是否在 C# 中引发了事件?

c# - WPF:在 ListView 中添加项目时引发事件

java - 如何在 Android 中显示以毫秒为单位的日期和时间?