Schedule
Slant / Controls
A “Schedule a review” form: a DatePicker from today on, a segmented TimeField and two Selects, checked when you submit and read back as one sentence.
The theme follows the link: share a page with ?theme=moon.
Usage
- Each control sits in a
<Field>: aDatePickerwithminset to today, aTimeFieldwithminuteStep={15}, andSelects for the duration (default 30 minutes) and the repeat. The field names each one and wires its description and error. - All four are controlled: the date is a local-midnight
Dateor null, the start a 24-hour"HH:mm"string or null, the selects strings. Eachnamesubmits through a hidden input:2026-11-03,14:30,30,weekly. - The form is
noValidate: Schedule checks the date and the time, turns the failing Fieldsinvalid, and moves focus to the first, the date input or the time’s first segment. A date the picker refused (not a date, or before today) fails too. - Once booked, the status line reads it back ("Review scheduled for Tuesday, November 3 at 2:30 PM for 30 minutes, every week.") and Change returns to the form with everything kept.
Keyboard
| Tab | moves through the date, its calendar button, the time’s segments, the two selects and Schedule |
| Digits | type a date, or the hour and the minute, which move on by themselves |
| Alt + ↓ | opens the calendar from the date input; the arrows move by day and week, Enter picks |
| ↑ / ↓ | steps the focused time segment (minutes by 15), or opens a select and moves through it |
| A / P | sets AM or PM on the time |
| Enter / Space | opens a select, or chooses its highlighted option |
| Escape | closes the calendar or a list without choosing |
Accessibility
- Each control is named by its Field label: the date input through
for, the time’s group and the selects througharia-labelledby. An error joinsaria-describedbyonly while it shows, and its control isaria-invalid. - A status region counts the fields that need attention, then reads the booking back; focus moves to the first problem, or to Change.
- The selects keep focus on their button and point at the highlighted option with
aria-activedescendant; the calendar takes focus while it is open and hands it back to its button.
Schedule in React and SwiftUI.
The React tab is the component’s real source; the SwiftUI tab is its twin in TUTTNKit.