AmandaRJ AmandaRJ - 1 month ago 18
jQuery Question

How to put interval of time for lunch using FullCalendar

Good afternoon everyone. I'm using FullCalendar and would like to know if you like me to put the lunch break in my schedule, so that time can be made not score schedule.

Example: Working hours from 08:00 to 18:00 and my lunch is from 12:00 until 13:00.

start:'08:00'
end:'18:00'

businessHours: [ // specify an array instead
{
dow: [ 1, 2, 3 ], // Monday, Tuesday, Wednesday
start: '08:00' // 8am
end: '18:00' // 6pm
}
]

Answer

What about to split it in two like this?

businessHours: [ // specify an array instead
    {   // AM
        dow: [ 1, 2, 3 ], // Monday, Tuesday, Wednesday
        start: '08:00' // 8am
        end: '12:00' // 12am
    },
    {   // PM
        dow: [ 1, 2, 3 ], // Monday, Tuesday, Wednesday
        start: '13:00' // 1pm
        end: '18:00' // 6pm
    }
]