如何设置fullCalender v2.2.5的营业时间 [英] How to set the business hours for fullCalender v2.2.5

查看:230
本文介绍了如何设置fullCalender v2.2.5的营业时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想确保'月视图'中显示的事件与事件开始和结束日期一致。然而,我注意到由于在fullCalendar中设置的默认营业时间(上午9点至下午5点),我有问题在'月视图'中显示事件



问题:
例如,给定两个事件(非全天事件),如下所示:

 事件A>> 
开始日期:3月7日|开始时间:下午2点
结束日期:3月9日|结束时间:上午9点30分

活动B>>
开始日期:3月7日|开始时间:下午2点
结束日期:3月9日|结束时间:上午8点30分

在March视图中,
事件A是显示在3月7日,8日和9日,而
活动B仅在3月7日和8日显示


问题:
如何设置业务小时从0000到2359完整日历,这样我就可以覆盖从0900到1700的默认营业时间。



我已经尝试了fullCalendar文档中建议的方法
http://fullcalendar.io/docs/display/businessHours/

  $(#calendarId).fullCalendar(
{
主题:true,
标题:
{
left:'prev,today,next',
center:'title',
right:'month,agendaWeek,agendaDay'
},

defaultView:'month',
eventColor:'#3485c1',
height:800,
aspec tRatio:0.5,
editable:true,
selectable:true,
events:arrayOfEventObj,
eventLimit:true,
timeFormat:'',

businessHours:
{
start:'00:00',
end:'23:59',
dow:[1,2,3,4,5 ,6,7]
}
}

然而,我仍然无法强调新的业务时间。为了强调新的业务时间,我需要设置一个属性吗?
或者我完全错了吗?


请指教。谢谢

解决方案

营业时间不应影响月视图,并且默认情况下关闭。您可以保留设置或将其设置为false,例如 businessHours:false



显示时间,您可以通过设置 minTime maxTime 来显示效果。


I want to ensure the events displayed in the 'month view' is accordance to the event start and end date. However, I notice due to the default business hours set in fullCalendar (9am to 5pm), I am having problem to display the events in the 'month view'

Problem : For example, given two events (Non all day event) as configured below:

Event A >> 
Start Date : 7 March | Start Time : 2pm 
End Date : 9 March | End Time : 09:30am

Event B >> 
Start Date : 7 March | Start Time : 2pm 
End Date : 9 March | End Time : 08:30am

In the 'month view' for March Event A is displayed across 7, 8 and 9 March while Event B is only displayed across 7 and 8 March

Question: How can i set the business hours in full calendar from 0000 to 2359 so that I can override the default business hours from 0900 to 1700

I have tried the method as suggested in the fullCalendar documentation http://fullcalendar.io/docs/display/businessHours/

$(#calendarId).fullCalendar(
{
        theme: true,
        header:
        {
            left: 'prev,today,next',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },

        defaultView: 'month',
        eventColor: '#3485c1',
        height: 800,
        aspectRatio: 0.5,
        editable: true,
        selectable: true,
        events: arrayOfEventObj,
        eventLimit: true,
        timeFormat: '',

        businessHours:
        {
            start: '00:00', 
            end: '23:59',
            dow: [ 1, 2, 3, 4, 5, 6, 7 ]
        }
}

However, I am still unable to emphasized the new businessHours. Is there a property that I need to set true in order to emphasized the new businessHours? Or am I totally doing it wrongly ?

Please advice. Thank you

解决方案

Business Hours shouldn't effect the month view and by default are off. You can leave the setting out or set it to false like this businessHours: false

For your agenda views that do show time, you can effect what's shown by setting minTime and maxTime.

这篇关于如何设置fullCalender v2.2.5的营业时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆