Repository navigation
feat(date-field): add regional dateFormat and showDayOfWeek - #573
Open
interacsean wants to merge 8 commits into
Open
interacsean wants to merge 8 commits into
interacsean wants to merge 8 commits into
Conversation
Add `dateFormat` ("numeric" | "regional") and `showWeekday` to DateField,
DatePicker and DateRangePicker, plus an app-wide `dateFormat` default on
AppShell. "regional" uses the locale's written form where it keeps the month
numeric (ja/zh/ko) and stays numeric elsewhere; the default stays "numeric".
The weekday is read-only and waits while a segment is mid-entry.
Refs tailor-inc/platform-planning#1883
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
/review |
Contributor
|
✅ Code Review completed successfully! Code review complete for PR #573: reviewed the changed package surfaces, export impact, and prior review context; no unresolved High or Medium issues found, so no inline review comments were needed.
|
Contributor
Code Metrics Report
Details | | main (94f6a5a) | #573 (44ecc98) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 88.1% | 88.2% | +0.0% |
| Files | 207 | 207 | 0 |
| Lines | 6176 | 6216 | +40 |
+ | Covered | 5446 | 5487 | +41 |
+ | Test Execution Time | 2m20s | 1m28s | -52s |Code coverage of files in pull request scope (93.7% → 94.3%, patch 100.0%)
Reported by octocov |
…screen readers (#1883) - Only date segments pend; editing hour/minute/second no longer blanks the weekday. - While a date segment is mid-entry, keep the pre-entry weekday (muted) instead of a placeholder, so the field doesn't reflow where the weekday leads (en-US). - Hide the weekday span from assistive tech and append the full weekday name to the date segments' aria-valuetext, so it's announced while editing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mat (#1883) Rename the AppShell-wide default to `dateInputDateFormat` (and the type to `DateInputDateFormat`) so `dateFormat` stays free for broader app-wide formatting later and no longer collides with DescriptionCard's internal `DateFormat`. Components keep their `dateFormat` prop. Note in JSDoc, docs and the changeset that the default is planned to become "regional" in a future major release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… to appShellDateFormat (#1883) "Weekday" reads as Mon–Fri; dayOfWeek matches the existing firstDayOfWeek prop. showWeekday becomes showDayOfWeek and the segment type/data-type becomes "dayOfWeek". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
interacsean
marked this pull request as ready for review
October 5, 2026 03:28
# Conflicts: # docs-manifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://github.com/tailor-inc/platform-planning/issues/1883
Demo
jpdate.mp4
What
Two opt-in additions to
DateField,DatePickerandDateRangePicker:dateFormat: "numeric" | "regional", plus an app-wide default on<AppShell dateInputDateFormat>(namespaced so a baredateFormatstays free for broader app-wide formatting). The component prop overrides the shell setting."numeric"is the default and is today's behaviour, so nothing changes on upgrade. The docs, JSDoc and changeset note that the default is planned to become"regional"in a future major release."regional"uses the locale's written business form wherever that form keeps the month numeric:2025年12月19日for ja / zh,2025년 12월 19일for ko.Intl.formatToParts, with no locale table, so one app-wide setting is safe for multi-locale apps.showDayOfWeekappends the locale's short day of the week where the locale places it:…19日(金)in ja,Fri, 12/19/2025in en. It is read-only and outside the tab order. The visible span isaria-hidden; instead, the full day name is appended to the date segments'aria-valuetext(e.g.19, Friday), so it's announced while editing.Why
ja business screens need
年月日and a day of the week next to dates where business days matter (e.g. closing dates). Today consumers swap a hand-built label in and out of the picker to get this; ra-support needs 137 lines for it. The issue has the details.Notes for reviewers
25shows the 2nd for one keystroke. To prevent that, the engine tracks a pending date segment, meaning one whose first digit could still take a second. While a segment is pending, the day of the week keeps showing the date from before the entry, muted, so the field doesn't reflow. It settles on auto-advance, on segment blur, or on any non-typing commit (arrows, shortcuts, calendar pick, controlled change). Time segments never pend.12월).regionalPartssplits it into a numeric part plus a literal.Intloutputs half-width(金); ja documents usually use full-width(金).showDayOfWeekis per-component only. It could get a shell-wide default if that's wanted.––day-of-week placeholder sits close to the range picker's–separator.Testing
25with no flash/showcase/date-picker→ "Date format + day of the week"): typing, arrow keys, and picking from the calendar.fmt:check,type-check,lint,test,build,check-dts,docs:check.🤖 Generated with Claude Code