I have included a complete calendar on my website. One of my requirements is getting business hours from the database and rendering them on the calendar. So basically every day has two shifts (morning and evening). I need to create an array of business hours with values populated from the database. Out of the box, I can use the code below to display normal business hours.
businessHours:
{
start: '10:00:00',
end: '16:00:00',
dow: [0,1,2,3,4,5,6]
},
I want to achieve something like this:
businessHours:[
{
start: '10:00:00',
end: '13:00:00',
dow: [0]
},
{
start: '14:00:00',
end: '19:00:00',
dow: [0]
},
{
start: '09:00:00',
end: '12:00:00',
dow: [1]
},
{
start: '12:30:00',
end: '18:00:00',
dow: [1]
},
]
If this is not possible with the existing properties of the full calendar, are there others to achieve this? Thank you in advance.
source
share