我想要显示多个营业时间
$ b $我想使用营业时间选项,但无法反映这些变化。 b这里是代码;
$('#calendar')。fullCalendar({ header:{ left:'prev,next today', center:'title', right:'month,agendaweek,agendaDay'}, defaultDate:'2014-11-12', editable:true, eventLimit:true,//当事件太多时允许更多链接 businessHours: [ { start:'10:00',//开始时间(本例中上午10点)结束:'12:00',//结束时间(本例中为12pm) dow:[1,2,3,4] //星期几。星期一整数(0 =星期日) //(星期一至星期四在这个例子中)}, { start:'12:00',//开始时间(本例中是12pm)结束:'18:00', //结束时间(在这个例子中是6pm) dow:[1,2,3,4] //星期几。 (0 =星期日) //(本例中的星期一至星期四)}] });解决方案
像这样 businessHours: { start:'11:00', end:'12:00', dow:[1,2,3,4,5] },
以便为不同的班次使用不同的小时数 - >使用后台事件
事件: [ { 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 /文档/ event_ui / eventConstr aint /
根据您使用日历的方式,您可以采取几种不同的方法。希望这些约束的灵活性能够帮助你得到你需要的东西。
很高兴这个功能终于出现了!
I am trying to use Business hour option , but i cant able to reflect the changes.
i want to display multiple business hours
here is the code ;
$('#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) }] });解决方案
like so
businessHours: { start: '11:00', end: '12:00', dow: [ 1, 2, 3, 4, 5] },in order to use different hours for different shifts -> use background events
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' } ]For more information, see this link, fullcalendar.io/docs/event_ui/eventConstraint/
There's several different ways you can approach this, depending on how you use the calendar. Hopefully the flexibility of the constraints will help you get what you need done.
Pretty glad this feature finally showed up!
更多推荐
全日历营业时间
发布评论