Full time on the calendar

I am trying to use the Hourly option, but I cannot reflect the changes.

I want to display several 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) }] }); 
+5
source share
2 answers

So

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

to use different clocks 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, http://fullcalendar.io/docs/event_ui/eventConstraint/

There are several different ways you can come close to this, depending on how you use the calendar. We hope that the flexibility of restrictions will help you get what you need.

Pretty glad this feature has finally arrived!

+7
source

I need to show FullCaledar Time Slot for 8AM to 8PM, so I did some R&D and applied the following parameters and it seems to work fine !!! Greetings.

 jq('#calendar').fullCalendar({ header: { left: 'prev,next', center: 'title', right: 'today,month,agendaWeek,resourceDay' }, defaultView: 'resourceDay', allDaySlot: false, axisFormat: 'h:mm A', timeFormat: 'h:mm T', minTime: '08:00:00', maxTime: '20:00:00', 

Usage, minTime: '08: 00: 00 ', maxTime: '20: 00: 00'

Thanks!!!

+1
source

Source: https://habr.com/ru/post/1210042/


All Articles