Setting multiple start-end range business hours for each resource
j1151300783 opened this issue · 6 comments
Is it possible to set specified multiple start-end time range businesshours per resources?
Like this:
"businessHours": [
{
"startTime": "2019-05-28T10:00:00Z",
"endTime": "2019-05-28T19:00:00Z"
},
{
"startTime": "2019-05-29T10:00:00Z",
"endTime": "2019-05-29T19:00:00Z"
}
]
Please refer to the support page and use Stack Overflow for help.
You can make businessHours
an array to have multiple ranges:
I have tried it before.
It is failed to set businessHours as specified multiple start-end datetime range per resource.
all i got is set the events.
https://stackoverflow.com/questions/27688279/full-calendar-business-hours
If it's not working, would you be able to post a runnable, stripped-down demonstration of the bug?
It is working as you describe in the demo I made:
Thanks for your replying.
I don't think it is a bug.
It's OK to set businessHours in this form:
businessHours: { startTime: '08:00', endTime: '18:00' }
But it would be failed to set businessHours like this :
businessHours: { startTime: '2019-05-28T10:00:00Z', endTime: '2019-05-28T19:00:00Z' }
I have finished by setting inverse-background event.
https://codepen.io/j1151300783/pen/VOOWgq?editors=0010
thanks for your info.
Maybe someone will search for this one day and land here... so for the search algo -> I was looking for a way to do a split shift for a resource in resources view. Say someone works 9am-3pm
and then 5pm-9pm
. I should see non-working hours background between 3pm
and 5pm
.
It was as easy as setting it this way:
{
businessHours: [
{
"daysOfWeek":[0, 1, 2, 3, 4, 5, 6],
"startTime":"09:00",
"endTime":"15:00"
},
{
"daysOfWeek":[0, 1, 2, 3, 4, 5, 6],
"startTime":"17:00",
"endTime":"21:00"
}
]
}
@tniezurawski Thanks a lot for this advice ! +1