需要在事件时间之前显示事件标题(fullcalendar) [英] Need to display event title before event time (fullcalendar)
问题描述
我有包含事件标题和事件时间的事件。不过,我需要在'fc-event-time'之前先在事件中显示'fc-event-title'。现在情况正好相反。我将如何去切换这个?
任何帮助都非常感谢。
> @ pumkin建议我编辑核心JavaScript(fullcalendar.js),这被证明是解决方案。我在3665行上看到以下内容:
(!event.allDay&& seg.isStart?
< span class ='fc-event-time'>+
htmlEscape(formatDates(event.start,event.end,opt('timeFormat')))+
< span>
:'')+
< span class ='fc-event-title'> + htmlEscape(event.title)+< / span> +
并将其替换为:
< span class ='fc-event-title'> + htmlEscape(event.title)+< / span> +
(!event.allDay& seg.isStart?
< span class ='fc-event-time'>+
htmlEscape(formatDates(event.start ,event.end,opt('timeFormat')))+
< / span>
:'')+
基本上,我只是在'fc-event-time'之前放置'fc-event-title'跨度。
I have events that contain both the event title and event time. However, I need to have 'fc-event-title' show up first in the event, before 'fc-event-time'. Right now it's the opposite. How would I go about switching this?
Any help is greatly appreciated.
User @ppumkin suggested that I edit the core javascript (fullcalendar.js), which proved to be the solution. I took the following item on line 3665:
(!event.allDay && seg.isStart ?
"<span class='fc-event-time'>" +
htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) +
"</span>"
:'') +
"<span class='fc-event-title'>" + htmlEscape(event.title) + "</span>" +
And replaced it with the following:
"<span class='fc-event-title'>" + htmlEscape(event.title) + "</span>" +
(!event.allDay && seg.isStart ?
"<span class='fc-event-time'>" +
htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) +
"</span>"
:'') +
Basically, I just put the 'fc-event-title' span before 'fc-event-time'.
这篇关于需要在事件时间之前显示事件标题(fullcalendar)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!