简体   繁体   English

FullCalendar在周时间线视图中隐藏时间

[英]FullCalendar hide time in week timeline view

Is there a way to hide the time in a timeline view. 有没有办法在时间线视图中隐藏时间。 In the month timeline you only see the days and no time, but in week timeline the time is also displayed. 在月份时间线中,您只能看到日期,没有时间,但在周时间线中,也会显示时间。

I want it to be the same in week timeline. 我希望它在周时间线中是相同的。 I need this because all my events are all-day events, so no need to display the time axis. 我需要这个,因为我的所有活动都是全天活动,所以不需要显示时间轴。

Desired result: 期望的结果:

Resource | 资源| Mon 1/12 | 周一1/12 | Tue2/12 | 星期二2月12日 Wed 3/12 | 3月3日星期三| Thu 4/12 | 星期四4/12 | Fri 5/12 | 5月5日星期五| Sat 6/12 | 星期六6月12日 Sun 7/12 太阳7/12

I have solved it by using duration and slotduration in a custom view: 我通过在自定义视图中使用持续时间和插槽来解决它:

defaultView: 'customWeek',
views: {
    customWeek: {
        type: 'timeline',
        duration: { weeks: 1 },
        slotDuration: {days: 1},
        buttonText: 'Custom Week'
    }
},

See also http://jsbin.com/mogefixege/edit?js,output for code 有关代码,另请参阅http://jsbin.com/mogefixege/edit?js,output

You can use basicWeek versus agendaWeek view See available views 您可以使用basicWeekagendaWeek视图查看可用视图

http://jsfiddle.net/e78b944d/1/ http://jsfiddle.net/e78b944d/1/

$('#calendar').fullCalendar({
  defaultView: 'basicWeek' /* versus 'agendaWeek' */
});

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

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