Calm motion: animations on this site only fade, with no movement
Scheduler
A day or week of time you can drag events into
A calendar of hours for the things that take time: meetings, shifts, appointments, lessons. Drag across empty time to make an event, drag an event to move it, pull its foot to change its length. For days with no times use Calendar. For work over weeks, Gantt.
A week
12 Mon13 Tue14 Wed15 Thu16 Fri17 Sat18 Sun
Standup 9:00 AM–9:30 AM
Design review 10:00 AM–11:30 AM
1:1 10:30 AM–11:00 AM
Lunch 12:00 PM–1:00 PM
v-modelis the events:{ id, title, date: "YYYY-MM-DD", start, end }withstartandendin minutes after midnight (540 = 09:00). No time zones: it is a local wall-clock day.v-model:dateis any day in the period shown.view="day"shows one day,"week"seven.- Pointer (mouse and pen): drag over empty time to create an event (a flick is ignored). Drag an event to move it in time and to another day. Drag its foot to resize it. Everything snaps to
snapminutes (15). Events that overlap sit side by side. Touch: events drag the same way, but empty time scrolls the page, so use Add event to create an event. - Keyboard: events are focusable (one tab stop). ↑ ↓ move by the snap. ← → move to the next or previous day (focus follows). Alt+↑ ↓ change the length. Enter goes to the title field, and Delete removes the event. Each change is announced with the day and times.
- The panel under the grid edits the selected event's title and removes it.
create,changeandremoveevents carry the event.dayStart/dayEndset the hours shown,hourHeightthe scale,:editable="false"makes it read-only, andlabelstranslates the wording.
Usage
ts
import { BlessScheduler } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
view | "week" | "day" | "week" | |
weekStart | 0 | 1 | 1 | 0 = Sunday, 1 = Monday |
dayStart | number | 7 | first and last hour shown (0–24) |
dayEnd | number | 20 | |
snap | number | 15 | minutes events snap to |
hourHeight | number | 48 | px per hour |
locale | string | "en" | |
editable | boolean | true | |
label | string | "Schedule" | |
labels | Partial<{ prev: string; next: string; today: string; add: string; remove: string; title: string; newEvent: string; eventName: (title: string, day: string, from: string, to: string) => string; moved: (title: string, day: string, from: string, to: string) => string; added: (title: string) => string; removed: (title: string) => string; hint: string; }> | — | |
modelValue | ScheduleEvent[] | [] | |
date | string | null | null | any day in the period shown |
selected | string | null | null |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: ScheduleEvent[]] | |
remove | [event: ScheduleEvent] | |
update:selected | [value: string | null] | |
change | [event: ScheduleEvent] | |
create | [event: ScheduleEvent] | |
update:date | [value: string | null] |