Content
- Name the event in the label: Start irrigation.
- Say what clashes and what to do: North Pump is already running then. Choose another start.
A date and a time chosen together, on the site’s clock, built for scheduling rather than for filtering.
Pick a day, then type or pick a time.
<WildDateTimePicker
v-model:date="start.date"
v-model:time="start.time"
label="Start irrigation"
hint="North Pump"
help="In the site’s time. Runs for 2 hours."
time-zone="Pacific/Auckland"
size="sm"
required
/>Two fields, one label, one message.
How typed times are read.
| Typed | 24-hour | 12-hour |
|---|---|---|
| 530 | 05:30 | 5:30 am |
| 5:30 | 05:30 | 5:30 am |
| 5.30pm | 17:30 | 5:30 pm |
| 17 | 17:00 | 5:00 pm |
| 12.15 p.m. | 12:15 | 12:15 pm |
| 25:00 | Not a time | Not a time |
Unreadable text stays in the field, with a prompt for a time like 05:30.
The zone label is the site’s, for the day and time chosen.
Shared field states and the two heights.
Scheduling a manual run, with its finish time.
A screen reader hears “Start irrigation date” and “Start irrigation time”, then the message.
| Key | What it does |
|---|---|
| Enter / Space / ↓ / ↑ | Date field: opens the calendar. |
| Backspace / Delete | Date field: clears, unless required. |
| ← → ↑ ↓ | Calendar: moves a day or a week. |
| Home / End | Calendar: start or end of the week. |
| Page Up / Page Down | Calendar: a month, or a year with Shift. Time list: an hour. |
| Enter / Space | Calendar: chooses the day. |
| ↓ / ↑ | Time list: moves, skipping times that can’t be chosen. |
| Enter / Tab | Time field: keeps what the field says. |
| Esc | Closes the panel. Twice restores the saved time. |
| Prop | Type | Default | Description |
|---|---|---|---|
| v-model:date | string | '' | The day, YYYY-MM-DD. |
| v-model:time | string | '' | The time, HH:mm, 24-hour. |
| label | string | — | Shared by both halves. |
| hint | string | — | Context, right of the label. |
| help | string | — | Guidance under the fields. |
| error | boolean | string | false | Reddens both halves; a string also shows. |
| required | boolean | false | Marks the label; removes Clear. |
| disabled | boolean | false | Both halves. |
| size | 'sm' | 'lg' | 'sm' | 36px or 44px tall. |
| hour-cycle | 12 | 24 | 24 | How times show. |
| step | number | 15 | Minutes between listed times. |
| min / max | string | — | A date, or a date and time. |
| time-zone | string | 'Pacific/Auckland' | The site’s IANA zone. |
| zone-label | string | false | worked out | Overrides the label; false hides it. |
| week-starts-on | 0 | 1 | 1 | 1 is Monday, 0 Sunday. |
| today | string | site’s today | Pins today, YYYY-MM-DD. |
| width | number | string | — | Control width. |
| name | string | — | Posts YYYY-MM-DDTHH:mm, no offset. |
| aria-label | string | — | Names the pair when there’s no label. |
| Token | Value | Where it lands |
|---|---|---|
| --radius-lg | 8px | Both fields. |
| --global-blue-1000 | #1877F2 | Focus edge, open field, chosen day. |
| --global-blue-100 | #EBFAFF | Today’s tint. |
| --global-blue-1100 | #0C296A | Today’s number; chosen day on hover. |
| --color-text-secondary | #4F4D55 | Weekdays, hint, help, zone. |
| --color-error | #E12121 | Error edge and message. |
| --shadow-dropdown | 0 4px 12px rgba(0,0,0,.08), … | Both panels. |