我正在尝试使用营业时间选项,但我无法反映这些变化.
我想显示多个营业时间
这是代码;
$('#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)
}]
});
Run Code Online (Sandbox Code Playgroud)
像这样
businessHours:
{
start: '11:00',
end: '12:00',
dow: [ 1, 2, 3, 4, 5]
},
Run Code Online (Sandbox Code Playgroud)
为了不同的班次使用不同的时间 - >使用背景事件
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'
}
]
Run Code Online (Sandbox Code Playgroud)
有关更多信息,请参阅此链接, http://fullcalendar.io/docs/event_ui/eventConstraint/
还有,你可以接近这一点,这取决于你如何使用日历几种不同的方式.希望约束的灵活性将帮助您获得所需的工作.
很高兴这个功能终于出现了!
| 归档时间: |
|
| 查看次数: |
16547 次 |
| 最近记录: |