Week view
WeekView. It is copied into your app’s ui/ by qatjs add week: the code is yours to edit.
Example
Thu 22Fri 23Sat 24
All day
Nothing yet
import WeekView, { type WeekEvent } from './ui/week/week.qx'
const events: WeekEvent[] = [
{ id: 'brief', title: 'Courier briefing', start: '2026-10-22T09:00', end: '2026-10-22T10:30', tone: 'neutral' },
{ id: 'call', title: 'Supplier call', start: '2026-10-23T10:00', end: '2026-10-23T11:00' },
{ id: 'stock', title: 'Stocktake', start: '2026-10-23', allDay: true },
]
export default function Example() {
let made = state('')
return (
<WeekView
label="Deliveries"
start="2026-10-22"
days={3}
hours={[8, 18]}
events={events}
now="2026-10-23T12:00"
locale="en-GB"
height={288}
on:create={(e) => (made = `new ${e.start}–${e.end.slice(11)}`)}
on:open={(id) => (made = `opened ${id}`)}
/>
<p>{made || 'Nothing yet'}</p>
)
}made stateAdd it
npx qatjs add weekWeekView
As a custom element: <ui-week-view>.
| Prop | Type | Attribute |
|---|---|---|
label | string | yes |
start | string | yes |
days | number | yes |
hours | [number, number] | property only |
events | WeekEvent[] | property only |
now | string | yes |
locale | string | yes |
height | number | yes |
| Event | Detail |
|---|---|
on:open | CustomEvent<string> |
on:create | CustomEvent<{ start: string; end: string }> |
Keys
| Key | Does |
|---|---|
| Tab | to an event, to a day’s “New event” |
| Enter | open, create |