Calendar
Calendar. It is copied into your app’s ui/ by qatjs add calendar: the code is yours to edit.
Example
October 2026
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
October 2026
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
Day 2026-10-23; from 2026-10-10 to 2026-10-14
import { Calendar } from './ui/calendar/calendar.qx'
export default function Example() {
let day = state<string | undefined>('2026-10-23')
let from = state<string | undefined>('2026-10-10')
let to = state<string | undefined>('2026-10-14')
return (
<div class="example-grid">
<Calendar locale="en" min="2026-10-05" bind:value={day} />
<Calendar range locale="en" bind:start={from} bind:end={to} />
</div>
<p>
Day {day ?? 'none'}; from {from ?? 'any'} to {to ?? 'any'}
</p>
)
}day statefrom stateto stateAdd it
npx qatjs add calendarCalendar
A month to choose a day — or, with `range`, two — from; `bind:value`, or `bind:start` and `bind:end`. As a custom element: <ui-calendar>.
| Prop | Type | Attribute |
|---|---|---|
value | string | yes |
start | string | yes |
end | string | yes |
range | boolean | yes |
min | string | yes |
max | string | yes |
locale | string | yes |
autofocus | boolean | yes |
| Event | Detail |
|---|---|
on:update:value | CustomEvent<string> |
on:update:start | CustomEvent<string> |
on:update:end | CustomEvent<string | undefined> |
on:pick | CustomEvent<string> |
Keys
| Key | Does |
|---|---|
| ← → | a day |
| ↑ ↓ | a week |
| PageUp, PageDown | a month |
| Shift+PageUp, PageDown | a year |
| Home, End | the week’s ends |
| Enter, Space | choose |