简体   繁体   English

如何在日历上绘制事件?

[英]How events are drawn on calendar?

I'm working on a project where I have to create a web-based daily event calendar that shows events dynamically. 我正在一个项目中,我必须创建一个基于Web的每日事件日历以动态显示事件。 I do understand the general idea behind the backend part of the event calendar 我确实了解活动日历后端部分的总体思路

However, I don't understand: 但是,我不明白:

  1. How events' boxes/bars are drawn on the table that represents time slots. 如何在代表时隙的表上绘制事件的框/条。 Are they normal buttons? 它们是普通按钮吗? or something else? 或者是其他东西?

Let's say they are buttons; 假设它们是按钮; then: 然后:

  1. How can we display them on the correct place on the table based on the events' starting and ending times that we get from the backend. 我们如何根据从后端获得的事件的开始和结束时间,将它们显示在表格的正确位置上。 ie How can we make sure that the events' boxes/bars are drawn from a particular time slot to another time slot? 即我们如何确保事件的框/条从一个特定的时隙绘制到另一个时隙?

EDIT : I want to customise daypilot's event calendar to create a daily event calendar that displays events dynamically from a backend. 编辑:我想自定义daypilot的事件日历以创建每日事件日历,以动态显示来自后端的事件。 I don't want event's name and details to be written on the box representing the event. 我不希望活动的名称和详细信息写在代表活动的框中。 I want all of the boxes representing events to have the same width but different height depends on the length of the event (see the picture below). 我希望代表事件的所有框都具有相同的宽度,但不同的高度取决于事件的长度(请参见下图)。

The question is which function/method is responsible for drawing events' boxes on the time slots table? 问题是哪个函数/方法负责在时隙表上绘制事件的框? I hope the question is well described now. 我希望这个问题已经得到很好的描述。

例

You can use Bootstrap calender controls templates with jQuery supported even handlers: 您可以将Bootstrap日历控件模板与jQuery支持的甚至处理程序一起使用:

https://bootstrap-calendar.azurewebsites.net/ https://bootstrap-calendar.azurewebsites.net/

https://www.formget.com/bootstrap-calendar/ https://www.formget.com/bootstrap-calendar/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM