diff --git a/.changeset/show-day-of-week.md b/.changeset/show-day-of-week.md new file mode 100644 index 000000000..ac4c56de6 --- /dev/null +++ b/.changeset/show-day-of-week.md @@ -0,0 +1,9 @@ +--- +"@tailor-platform/app-shell": minor +--- + +Add `showDayOfWeek` to `DateField`, `DatePicker`, and `DateRangePicker`. It appends the locale's short day of the week where the locale places it (`2025/12/19(金)`, `Fri, 12/19/2025`). It is read-only and derived from the entered date. While a date segment is mid-entry it keeps showing the previous day of the week, so typing `25` never flashes the 2nd's. Screen readers hear the full day name with each date segment's value. + +```tsx + +``` diff --git a/docs-manifest.json b/docs-manifest.json index 06036a7e7..749f4e4b3 100644 --- a/docs-manifest.json +++ b/docs-manifest.json @@ -470,10 +470,10 @@ "DateRangePickerProps" ], "hashes": { - "typeSurface": "6b07d4169fa991df", - "outline": "caab56e5766bdb72", + "typeSurface": "a0f5522359e8f81d", + "outline": "50e117ad2a0562ba", "snapshot": null, - "outputMd": "f39002ad79625dc4", + "outputMd": "bc69f14829004f9d", "examples": null } }, @@ -1694,7 +1694,7 @@ "packages/core/skills/app-shell-patterns/references/components/command-palette.md": "7e5bc675a593791a", "packages/core/skills/app-shell-patterns/references/components/csv-importer.md": "53d3c795ca21b9dc", "packages/core/skills/app-shell-patterns/references/components/data-table.md": "3e8474e4d1437c91", - "packages/core/skills/app-shell-patterns/references/components/date-picker.md": "f39002ad79625dc4", + "packages/core/skills/app-shell-patterns/references/components/date-picker.md": "bc69f14829004f9d", "packages/core/skills/app-shell-patterns/references/components/default-header.md": "375e55f4b12fa2be", "packages/core/skills/app-shell-patterns/references/components/default-sidebar.md": "3422388a0cc78571", "packages/core/skills/app-shell-patterns/references/components/description-card.md": "a347fd1f4ccd433e", diff --git a/docs-src/components/date-picker.docs.outline.md b/docs-src/components/date-picker.docs.outline.md index 81d3a8219..d6a97abd2 100644 --- a/docs-src/components/date-picker.docs.outline.md +++ b/docs-src/components/date-picker.docs.outline.md @@ -183,6 +183,14 @@ Locale and timezone come from AppShell automatically. Override per field with `l ``` +### Day of the week + +`showDayOfWeek` adds the locale's short day of the week where the locale places it — `2025/12/19(金)` for ja-JP, `Fri, 12/19/2025` for en-US. It is read-only and derived from the entered date: it shows a placeholder until the date is complete, and while a date segment is mid-entry it keeps the previous day of the week (muted), so typing `25` into the day never flashes the 2nd's. Screen readers hear the full day name with each date segment's value. + +```tsx + +``` + ## Keyboard - **Segments:** `↑`/`↓` increment/decrement, digits type-to-fill (auto-advance), `←`/`→` move between segments, `Backspace` clears, `/` commits the current segment and advances. @@ -209,6 +217,7 @@ Locale and timezone come from AppShell automatically. Override per field with `l | `hourCycle` | `12 \| 24` | Force 12- or 24-hour time; defaults to the locale | | `autoFocus` | `boolean` | Focus the first segment on mount | | `locale` | `string` | BCP-47 locale override | +| `showDayOfWeek` | `boolean` | Show the locale's short day of the week next to the date | | `name` | `string` | Emits a form value through the proxy input | | `id` | `string` | Proxy input id (use with external `