ValyroUI English version

Scheduler

Планировщик: день, неделя, месяц и таймлайн ресурсов, drag & drop, повторы. Pro · Работа и команды › Планирование

Установка

npx valyro-cli@latest login
npx valyro-cli@latest add scheduler
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { Scheduler } from 'valyro-ui-pro';

Пропсы

PropTypeDefault
eventsreadonly SchedulerEvent[]Controlled events; use with onEventsChange.
defaultEventsreadonly SchedulerEvent[]Initial events when uncontrolled.
onEventsChange(events: SchedulerEvent[]) => voidThe whole list after a drag or resize; series occurrences are detached (see recurringEventId).
onEventChange(change: SchedulerEventChange) => voidThe single change behind each onEventsChange, with occurrenceDate for series occurrences.
onEventCreate(slot: SchedulerSlot) => voidClick or drag over empty slots, or Enter on a focused slot. Without it, slots are not creatable.
onEventClick(occurrence: SchedulerOccurrence, anchor: HTMLElement) => voidClick or Enter on an event; anchor is its element, e.g. for a popover.
resourcesreadonly SchedulerResource[][]Rows of the timeline view (rooms, people).
view'day' | 'week' | 'workWeek' | 'month' | 'timeline' | 'agenda'Controlled view; use with onViewChange.
defaultView'day' | 'week' | 'workWeek' | 'month' | 'timeline' | 'agenda''week'Initial view when uncontrolled.
onViewChange(view: SchedulerView) => voidCalled with the new view when it changes.
viewsreadonly SchedulerView[]Views in the switcher. Default day, week, month, plus timeline when there are resources.
dateDateAny date in the shown range.
defaultDateDateInitial date when uncontrolled.
onDateChange(date: Date) => voidCalled with the new date when it changes.
minHournumber0First visible hour of the day, week and timeline views; events entirely outside the hours are not shown there.
maxHournumber24Hour the day, week and timeline views end at (exclusive).
slotDuration15 | 30 | 6030Minutes per slot row (and per timeline column).
snapDurationnumber15Minutes that drags and resizes snap to.
scrollToHournumberHour scrolled into view on mount. Default an hour before the working day starts.
workingHoursSchedulerWorkingHours | null{ start: 9, end: 17, days: [1, 2, 3, 4, 5] }Time outside these hours is shaded; null turns shading off.
weekStartsOn0 | 1 | 2 | 3 | 4 | 5 | 61First day of the week, month and agenda views and the mobile day strip: 0 = Sunday, 1 = Monday.
maxEventsPerDaynumber3Month view: events per day before "+N more".
mobileView'day' | 'agenda' | false'day'Below 640px the week, work week and month views render as this view; false keeps them.
readOnlybooleanfalseEvents stay clickable but cannot be moved, resized or created.
loadingbooleanfalseDims the calendar with a spinner and marks it busy.
localestringDate and time formatting, incl. 12/24-hour clock. Defaults to the ThemeProvider locale, then the browser's.
labelsPartial<SchedulerLabels>Overrides for the built-in English text; keys left out keep their defaults.

Похожие компоненты

  • Calendar View — Календарь событий
  • Kanban Board — Доска задач
  • Gantt Chart — Диаграммы Ганта с зависимостями и перетаскиванием
  • Booking Slots — Запись на встречу: календарь, слоты в часовом поясе гостя, форма и подтверждение
  • CRM Pipeline — Воронка сделок: этапы, суммы и вероятности, перетаскивание между этапами
  • Approval Flow — Многоэтапное согласование: последовательные и параллельные этапы, решения с причиной, история
  • Goal Tracker — OKR: цели и ключевые результаты, статусы, уверенность, чек-ины с историей
  • Onboarding Checklist — Чек-лист онбординга: прогресс, подсказки с CTA, скрытие и празднование
  • Course Path Navigator — Карта курса: модули, блокировки, прогресс и навыки, список на узком экране
  • Team Members — Участники команды: роли, приглашения по email, ожидающие инвайты, счётчик мест
  • Org Chart — Оргструктура: дерево с зумом и панорамой, поиск, сворачивание веток
  • Activity Feed — Лента активности

Назад: Calendar View · Далее: Kanban Board · Весь раздел «Работа и команды»