gpt4 book ai didi

fullcalendar - 全日历营业时间

转载 作者:行者123 更新时间:2023-12-04 14:12:07 24 4
gpt4 key购买 nike

我正在尝试使用营业时间选项,但我无法反射(reflect)更改。

我想显示多个营业时间

这是代码;

    $('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultDate: '2014-11-12',
editable: true,
eventLimit: true, // allow "more" link when too many events
businessHours:
[
{
start: '10:00', // a start time (10am in this example)
end: '12:00', // an end time (12pm in this example)
dow: [ 1,2,3,4 ]
// days of week. an array of zero-based day of week integers (0=Sunday)
// (Monday-Thursday in this example)
},
{
start: '12:00', // a start time (12pm in this example)
end: '18:00', // an end time (6pm in this example)
dow: [ 1,2,3,4 ]
// days of week. an array of zero-based day of week integers (0=Sunday)
// (Monday-Thursday in this example)
}]
});

最佳答案

像这样

businessHours:
{

start: '11:00',
end: '12:00',
dow: [ 1, 2, 3, 4, 5]
},

为了对不同的类次使用不同的时间 -> 使用后台事件
events:
[
{
id: 'available_hours',
start: '2015-1-13T8:00:00',
end: '2015-1-13T19:00:00',
rendering: 'background'
},
{
id: 'work',
start: '2015-1-13T10:00:00',
end: '2015-1-13T16:00:00',
constraint: 'available_hours'
}
]

有关更多信息,请参阅此链接,
http://fullcalendar.io/docs/event_ui/eventConstraint/

有几种不同的方法可以解决这个问题,具体取决于您使用日历的方式。希望约束的灵活性将帮助您完成所需的工作。

很高兴这个功能终于出现了!

关于fullcalendar - 全日历营业时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27688279/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com