开发者

Display ending time in fullcalendar week view only

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 lik开发者_Go百科e the regular week view to have start and end time. (In month view, it just takes too much space.)


Sorry, found the answer here:

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

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


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
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜