EXAMPLE SCREENS
Calendar
Week and month views over one dataset. Tuesday holds two overlapping events sharing the column; click a slot to create one.
PREVIEW
SOURCE
import { Tabs, WeekView, Calendar, DatePicker, Drawer, Modal } from '@objectifthunes/whiteboard'
// One anchor date drives both views.
const [anchor, setAnchor] = useState(today)
<Tabs variant="enclosed" value={view} onChange={setView} items={[
{ id: 'week', label: 'Week', content: (
<WeekView
events={events}
date={anchor}
onDateChange={setAnchor}
onEventClick={setOpen}
onSlotClick={setSlot}
startHour={8}
endHour={19}
/>
) },
{ id: 'month', label: 'Month', content: (
<Calendar selected={anchor} onSelectDate={d => { setAnchor(d); setView('week') }} />
) },
]} />
<DatePicker value={jump} onChange={d => d && setAnchor(startOfDay(d))} clearable={false} />NOTES
One dataset, two views. WeekView places the events and resolves overlaps per cluster — Tuesday has two that share the column. Calendar under the Month tab drives the same anchor date, which is what makes it worth having both.
Click an event for a Drawer, or an empty slot for a Modal that actually adds one. DatePicker in the header jumps to a week.