Description
In the vehicle departure-time entry on the add/edit vehicle overlay
(VehicleDetailsOverlay.tsx),
the hour (HH) and minute (MM) fields are separate inputs. When a user types an hour and
moves on, the minutes field is often left blank, which fails validation
(isValidTime) and
forces the user to manually type 00. The overwhelmingly common case is an on-the-hour
departure (e.g. 9:00), so we should default the minutes to 00 automatically once the
hour is entered.
Goal
When a user enters a value in the hour field, the minute field auto-fills with 00 unless
the user types their own minutes.
Scope
In scope
- In VehicleDetailsOverlay.tsx,
when a valid hour is entered and the minutes field is empty, set minutes to "00".
- Keep the auto-filled
00 editable — if the user types in the minutes field, their input
replaces the default rather than appending to it.
- Ensure the auto-filled value flows through existing validation and the
departureTime string built at
line 164.
Out of scope
- Changing the two-field layout into a single combined time input or a time picker.
- Applying the same behavior to any other time fields (e.g. address time windows).
- Changing meridiem (am/pm) defaulting behavior.
Acceptance Criteria
Assignee
@Gill87
Description
In the vehicle departure-time entry on the add/edit vehicle overlay
(VehicleDetailsOverlay.tsx),
the hour (
HH) and minute (MM) fields are separate inputs. When a user types an hour andmoves on, the minutes field is often left blank, which fails validation
(isValidTime) and
forces the user to manually type
00. The overwhelmingly common case is an on-the-hourdeparture (e.g.
9:00), so we should default the minutes to00automatically once thehour is entered.
Goal
When a user enters a value in the hour field, the minute field auto-fills with
00unlessthe user types their own minutes.
Scope
In scope
when a valid hour is entered and the minutes field is empty, set minutes to
"00".00editable — if the user types in the minutes field, their inputreplaces the default rather than appending to it.
departureTimestring built atline 164.
Out of scope
Acceptance Criteria
00when itis empty.
is kept and not overwritten by
00.HH:00am/pmdeparture timeand passes validation without a "departure" error.
minutes → hours) still works.
Assignee
@Gill87