[英]Add custom text to event in Day view - FullCalendar
How to add custom text in a fullcalendar event day view.如何在 fullcalendar 活动日视图中添加自定义文本。 I have this requirement to add a tagging in the event.
我有这个要求在事件中添加标记。 Please refer to image attached.
请参考所附图片。
If you want to add something to an event, look at thee eventRender - you can modify the HTML of the event an way you want, and you have access to all the event's properties as a data source.如果您想向事件添加一些内容,请查看您的eventRender - 您可以按照您想要的方式修改事件的 HTML,并且您可以访问所有事件的属性作为数据源。
eg例如
eventRender: function(info)
{
info.el.innerHTML += info.event.extendedProps.description;
}
NB This specific example relies on you having an extra property called "description" in the event data you pass to the calendar - demo: https://codepen.io/ADyson82/pen/qBKvqom .注意:此特定示例依赖于您在传递给日历的事件数据中有一个名为“描述”的额外属性 - 演示: https://codepen.io/ADyson82/pen/qBKvqom 。 But of course you can also simply manipulate the existing content, or display something from another standard property too.
但当然,您也可以简单地操作现有内容,或显示来自另一个标准属性的内容。 The world's your oyster.
世界是你的牡蛎。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.