Scheduler - Blocked Intervals

Display blocked windows and prevent invalid creation or drops.

#Usage

import { Scheduler } from '@primeui/vue-scheduler';
<Scheduler.Root :blocked-intervals="blockedIntervals" :event-allow="eventAllow">
    <!-- Scheduler parts -->
</Scheduler.Root>

Blocked intervals are configured on Scheduler.Root so every active view can reject unavailable time consistently. Pair them with event-allow when the application also needs to validate drag or resize moves.

#Constraints

blockedIntervals uses the Scheduler blocked-interval options object.

import type { BlockedIntervalsOptions, EventAllowCallback } from '@primeui/vue-scheduler';

const blockedIntervals: BlockedIntervalsOptions = {
    intervals: [
        {
            id: 'maintenance',
            start: new Date(2026, 5, 10, 12),
            end: new Date(2026, 5, 10, 13),
            title: 'Maintenance'
        }
    ],
    preventCreate: true,
    preventDragInto: true
};

eventAllow is a callback that returns true for accepted drops and false for rejected drops. It receives dropInfo with start, end, allDay, view, and optional resourceId, plus the dragged event.

const eventAllow: EventAllowCallback = (dropInfo, draggedEvent) => {
    return dropInfo.resourceId === undefined || dropInfo.resourceId === draggedEvent.resourceId;
};

Keep it with blockedIntervals when availability rules change by resource, range, or permission.

#Blocked Time

Blocked intervals mark unavailable week slots with a tinted band, keep the reason visible inside the range, and reject invalid creates or drops.

Loading Demo...

#Resources

Resource blocked intervals expose resource ids, row or column UI, and resource-specific payloads.

Loading Demo...

#Customization

Customize blocked time by pairing the blocked interval surface with timeline event UI. Scheduler still handles collision rules, drag prevention, and horizontal time placement.

Loading Demo...

#API

Key inputs are blockedIntervals.intervals, blockedIntervals.allowOverlap, blockedIntervals.preventCreate, blockedIntervals.preventDragInto, blockedIntervals.showInTimeline, and blocked interval date/resource fields.