Files
bible/rules/patterns/web-visual-baseline/formatting/weeks.md
T

17 lines
809 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Week display keeps the date intact
An enhanced date picker may show the week label in an alternate input while its original
field retains the date. A native input and a server-supplied label are also sufficient:
```html
<label for="delivery-date">Delivery date</label>
<input id="delivery-date" name="delivery_date" type="date"
value="2026-10-01" aria-describedby="delivery-week">
<span id="delivery-week">2026 · W40</span>
```
Recompute the label after selection, programmatic value changes and reset. Submit the original
`YYYY-MM-DD` value. Parse date-only strings as calendar dates, not timestamps that shift with
timezone conversion. Cross-year example: `2026 · W53 – 2027 · W01`, never `W1-53`.
The current-week header uses the operator's local date; audit event timestamps retain time.