全日历营业时间

编程入门 行业动态 更新时间:2024-10-27 04:28:53
本文介绍了全日历营业时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想要显示多个营业时间

$ 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!

更多推荐

全日历营业时间

本文发布于:2023-10-23 01:38:30,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:营业时间   日历

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!