Unavailable hours for Resource calendar mode
Need unavailable hours customisation for Resource Calendar mode, like one resource not able at specific time or all day.
bump, any updates if this is gonna get implemented soon?
The same issue
Any update on this? Having custom unavailableHours per resource would be a big plus in enabling multiple locations with different work schedules or multiple people to manage with different work schedules.
If I understand correctly, this seems to be fixed now.
You can add a resourceId to the unavailableHours items. That way each unavailableHours item can be for an individual resource just like the events.
If I understand correctly, this seems to be fixed now.
You can add a
resourceIdto theunavailableHoursitems. That way each unavailableHours item can be for an individual resource just like the events.
No adding a resourceId to the unavailableHours items won't work.
Looking at UnavailableHoursProvider.tsx line 42-> 45 and line 67->74 to see how it handles the unavailableHours props:
// line 42->45
let originalData: Record<string, UnavailableHourProps[]> = {};
if (Array.isArray(unavailableHours)) {
originalData = {
'1': unavailableHours,
'2': unavailableHours,
'3': unavailableHours,
'4': unavailableHours,
'5': unavailableHours,
'6': unavailableHours,
'7': unavailableHours,
};
} else {
originalData = unavailableHours;
}
// line 67->74
const forceDate = forceUpdateZone(startDateTime, timeZone);
const dateUnix = forceDate.toMillis();
const weekDay = forceDate.weekday;
const dateStr = forceDate.toFormat('yyyy-MM-dd');
const unavailableHoursByDate = originalData[dateStr] || originalData[weekDay];
From this, you can see the logic only supports handling unavailable hours by specific dates (yyyy-MM-dd) or weekdays (1–7). It doesn’t account for resource-level filtering.