Display ending time in fullcalendar week view only

有些话、适合烂在心里 提交于 2019-12-10 18:01:03

问题


Edit to add: Sorry, found the answer here:

http://arshaw.com/fullcalendar/docs/text/timeFormat

timeFormat: { 
month: 'H:mm', 
'': 'H:mm-{H:mm}' 
},

end of edit

I'm using fullcalendar, and I want to include the ending time in the "week" and "day" views. I found an answer by Nico on how to display the ending time:

timeFormat:  'HH:mm { - HH:mm}'

Nico wrote:

Blockquote the time between {} is the end time. If you don't specify the ending time between curly brackets it will just display the start time twice

How could I only show the end time in views other than the full month view? I would like the regular week view to have start and end time. (In month view, it just takes too much space.)


回答1:


Sorry, found the answer here:

http://arshaw.com/fullcalendar/docs/text/timeFormat

timeFormat: { 
month: 'H:mm', 
'': 'H:mm-{H:mm}' 
},



回答2:


UPDATE

The above answer no longer works in the newest version of FullCalendar. The correct answer is the use the displayEventEnd option for the view. Like this:

views: {
    week: {
        displayEventEnd: true
    }
}


来源:https://stackoverflow.com/questions/7237422/display-ending-time-in-fullcalendar-week-view-only

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!