Skip to content

feat(DateInput, DateTimeInput): a non-Gregorian calendar uses the Astryx picker - #9793

Merged
nynexman4464 merged 5 commits into
nynexman4464/feat/calendar-typed-entryfrom
nynexman4464/feat/calendar-native-fallback
Nov 5, 2026
Merged

nynexman4464 merged 5 commits into
nynexman4464/feat/calendar-typed-entryfrom
nynexman4464/feat/calendar-native-fallback

Conversation

@nynexman4464

@nynexman4464 nynexman4464 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Base is #9643's branch. This diff holds only this PR's commits. #9794 (bottom sheet) stacks on this branch, and #9653 on #9794.

This implements spec:AST-111 (approved in #9605) FR15 and DEC-7, with FR5's fallback, for DateInput and DateTimeInput.

User need

A Persian, Hebrew, or Japanese user on a phone opens a date field and sees the native date picker. That picker is Gregorian (Android) or follows the device calendar (iOS), so the date they pick reads as a different date than the field shows. On a desktop, an explicit presentation="native" has the same problem.

Problem and solution fit

  • FR15: with a calendar other than gregory or iso8601, every presentation that would show <input type="date"> uses the Astryx popover on a fine pointer and the bottom sheet on a coarse pointer. This covers adaptive-native (the default), the deprecated nativePicker values, and an explicit presentation="native", which also warns once in development (DEC-7). DateTimeInput's date and time surfaces follow the same rule.
  • useCalendarPresentation resolves the calendar and the presentation policy it allows; calendarPickerPresentation in inputPresentation.ts maps native and adaptive-native to adaptive-bottom-sheet; isGregorianCalendar in the calendar-system utility names the calendars the native control can show, and useTypedDate now uses it too.
  • Values stay Gregorian ISO (FR3). Without Temporal, calendars that need it fall back to Gregorian, and with them the native control (FR5). A -u-ca- keyword in the provider locale does not select the calendar, so such a field keeps Gregorian dates and the native control; calendar on the component or the provider selects one.
  • Not yet: on a coarse pointer, the bottom sheet and the closed field text still show Gregorian dates. The next PR makes them follow the calendar (FR16). The records state the bottom sheet as an implementation gap. The calendar JSDoc, the consumer docs for calendar and the changeset say that on a coarse pointer the field and its bottom sheet show Gregorian dates, and the dense nativePicker docs name the calendar exception.
  • AST-043 FR1, FR2 and FR3, DateInput FR2 and DateTimeInput FR3 name the calendar exception.

Current specification

  • spec:AST-111 FR15, FR3, FR5 and DEC-7 (approved in spec(AST-111): date components use the calendar the application chooses #9605).
  • spec:AST-043 FR1–FR3 now name the one exception to an explicit native: the calendar.
  • Projected into component:DateInput FR21 and component:DateTimeInput FR12, each with a Current-state gap for the Gregorian bottom sheet.
  • component:InternationalizationProvider FR10 now says only the bottom sheet and DateRangeInput show Gregorian dates. The provider's docs and JSDoc say the same and keep main's statement that Timestamp, PowerSearch, and Lab's Schedule write their dates in the calendar.

Public delta and caller burden

  • Behavior: under a non-Gregorian calendar, no presentation renders a native date control. An explicit native warns once in development.
  • No change for gregory/iso8601, and no change without Temporal for the calendars that need it.
  • No new props or types.
  • Caller decisions: none. A field that needs the native picker stays Gregorian.

Design and alternatives

  • Rejected (spec:AST-111 DEC-7): keeping an explicit native native. The device, not the application, would then choose the calendar.

Evidence

  • Unit tests: every presentation and deprecated nativePicker value × Gregorian/Persian × fine/coarse pointer for DateInput and DateTimeInput, the provider calendar, and the explicit-native warning (once, and not for Gregorian or the defaults).
  • No-Temporal tests: a Persian field becomes Gregorian with the native control and a warning; an explicit native stays native; a Persian bottom sheet shows Gregorian months; a Persian DateTimeInput shows Gregorian native controls.
  • A mutation that disables FR15 fails the presentation tests.
  • Real browsers against Storybook with a desktop viewport: Chromium 149 and Firefox 151 with native Temporal, with the polyfill, and with no Temporal; WebKit (Safari 26.5) with the polyfill and with no Temporal.

Screenshots

Chromium 149 with native Temporal unless noted.

State Screenshot
Desktop, Persian: an explicit presentation="native" uses the Astryx popover Desktop, Persian: an explicit presentation="native" uses the Astryx popover
No Temporal: Persian falls back to Gregorian, so the native picker is allowed again No Temporal: Persian falls back to Gregorian, so the native picker is allowed again

Scope

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm exec vitest run --maxWorkers=4 over the presentation and no-Temporal tests, packages/core/src/i18n, docPropLiterals.test.ts and the CLI core prop docs test, after the restack onto current main (with Lab's Schedule): 16 files, 218 tests passed. CI runs the full suites.
  • CLI docs tests (golden reads, core prop docs, core doc quality, core doc types) and docPropLiterals.test.ts: 5 files, 38 tests pass.
  • pnpm exec tsc --noEmit -p packages/core: passes.
  • pnpm check:knowledge, pnpm check:changesets: pass.
  • node scripts/pre-review.mjs --base nynexman4464/feat/calendar-typed-entry: 1,072 authored lines.

Writing rubric results

spec:AST-043

  • R1 narration: the FR1, FR2 and FR3 edits are present tense. The existing Intent still opens with "currently has two answers"; left as is, to keep this amendment minimal.
  • R2 research: none.
  • R3 evidence: the FR2 verification row says "eligibility fallback". No change references.
  • R4 rejected alternatives: none added.
  • R5 change references: none.
  • R6 open questions: none.

component:DateInput

  • R1 narration: FR21, ORD1 and the AST-013 exception are present tense. The touch-and-native gap is replaced by a narrower present-tense gap: the bottom sheet shows Gregorian dates. The Compatibility/readiness row keeps the sheet wheels' markup and time-order key (FR17) sentences and changes only "the calendar on the touch and native surfaces" to "the calendar on the touch surface".
  • R2 research: none.
  • R3 evidence: the FR21 basis and verification cite tests and real-browser runs. The existing (#5074) is part of a quoted test title.
  • R4 rejected alternatives: none.
  • R5 change references: only that quoted test title.
  • R6 open questions: none.

component:DateTimeInput

  • R1 narration: FR12 and ORD1 are present tense. The touch-and-native gap is replaced by a gap for the Gregorian Date panel of the bottom sheet. The Public contract row says the date segment and its popover show the calendar, matching that gap.
  • R2 research: none.
  • R3 evidence: tests only.
  • R4 rejected alternatives: none.
  • R5 change references: none.
  • R6 open questions: none.

component:InternationalizationProvider

  • R1 narration: the FR10 edit is present tense and names the surfaces that stay Gregorian.
  • R2 research: none.
  • R3 evidence: none added.
  • R4 rejected alternatives: none.
  • R5 change references: none.
  • R6 open questions: none.

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 5, 2026 3:14am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 5, 2026, 3:27 AM UTC

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the spec change this pull request makes; no blocking code defect was found.

  • To settle: current spec:AST-043 FR2 says an explicit presentation="native" always shows the native surface. This head rewrites FR1–FR3, adding component:DateInput FR17 and component:DateTimeInput FR11, so that outside gregory and iso8601 such a field shows the Astryx popover or bottom sheet and warns in development. The rewrite cites spec:AST-111 FR15 and DEC-7, which are still draft and not on main.

Any engineering owner, the author included if they are one, can record approval of that exception by commenting /approve-spec with the full head commit SHA. Two small non-blocking notes are inline: the matrix test titles leave out the expected surface, and the warning comment says once per calendar where the key is per component and calendar.

[Automated review]


describe('DateInput surface in a calendar', () => {
it.each(CASES)(
'%s in %s on a %s pointer shows the %s',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this format gets [name, props, calendar, pointer, surface], so a case reads "native in { presentation: 'native' } on a persian pointer shows the fine", and the expected surface never appears. Put props last in each CASES tuple so the four placeholders get name, calendar, pointer and surface. The same applies at line 256.

Comment on lines +43 to +44
// Synchronizes the development console. warnOnce makes a replay or a
// second field a no-op, so the warning appears once for each calendar.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the key includes the component, so a Persian DateInput and a Persian DateTimeInput on one page each warn once. Suggested wording: "Synchronizes the development console. The key is the component and calendar, so a replay or a second field does not warn again."

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the spec change this pull request makes, and one code fix is needed after that.

  • To settle: current spec:AST-043 FR2 says an explicit presentation="native" always shows the native surface (and FR3 keeps nativePicker exactly as released), while this pull request rewrites FR1–FR3 and adds component:DateInput FR17 and component:DateTimeInput FR11 so that outside gregory and iso8601 those values show the Astryx popover or bottom sheet and an explicit native warns, citing spec:AST-111 FR15 and DEC-7, which are still draft and not on main.
  • Required fix: isGregorianCalendar in utils/calendarSystem.ts repeats the gregory/iso8601 test that useTypedDate.ts keeps inline at lines 114 and 218, so call the shared helper there and the presentation and typed-entry rules cannot drift apart.

Any engineering owner, the author included if they are one, can record approval of the spec change by commenting /approve-spec with the full head commit SHA. Two small non-blocking notes are inline.

[Automated review]

* Whether `<input type="date">` can show the calendar. The native control is
* Gregorian by specification, so only `gregory` and `iso8601` qualify.
*/
export function isGregorianCalendar(calendar: CalendarSystem): boolean {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This predicate is the same test useTypedDate.ts keeps inline at lines 114 and 218 (calendar === 'gregory' || calendar === 'iso8601'). Please call isGregorianCalendar(calendar) and isGregorianCalendar(providerCalendar) there, so the presentation rule and the typed-entry rule share one definition of a Gregorian calendar.


describe('DateInput surface in a calendar', () => {
it.each(CASES)(
'%s in %s on a %s pointer shows the %s',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this format gets [name, props, calendar, pointer, surface], so a case reads "native in { presentation: 'native' } on a persian pointer shows the fine" and the expected surface never appears. Put props last in each CASES tuple so the four placeholders get name, calendar, pointer and surface (same at line 256).

Comment on lines +43 to +44
// Synchronizes the development console. warnOnce makes a replay or a
// second field a no-op, so the warning appears once for each calendar.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the key includes the component, so a Persian DateInput and a Persian DateTimeInput on one page each warn once. Suggested wording: "Synchronizes the development console. The key is the component and calendar, so a replay or a second field does not warn again."

@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-typed-entry branch from d3fbd62 to 2187c77 Compare November 3, 2026 20:51
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-native-fallback branch from bd1f569 to 698fdd8 Compare November 3, 2026 20:51

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the spec change this pull request makes, and one code fix is needed after that.

  • To settle: current spec:AST-043 FR2 says an explicit presentation="native" always shows the native surface (and FR3 keeps nativePicker exactly as released), while this pull request rewrites FR1–FR3 and adds component:DateInput FR17 and component:DateTimeInput FR11 so that, outside gregory and iso8601, those values and the default show the Astryx popover or bottom sheet (for the time control too) and an explicit native warns, citing spec:AST-111 FR15 and DEC-7, which are still draft and not on main.
  • Required fix: isGregorianCalendar in utils/calendarSystem.ts repeats the gregory/iso8601 test that useTypedDate.ts keeps inline at lines 117 and 221, so call the shared helper there and the presentation and typed-entry rules cannot drift apart.

Any engineering owner, the author included if they are one, can record approval of the spec change by commenting /approve-spec with the full head commit SHA. A small non-blocking note is inline.

[Automated review]

* Whether `<input type="date">` can show the calendar. The native control is
* Gregorian by specification, so only `gregory` and `iso8601` qualify.
*/
export function isGregorianCalendar(calendar: CalendarSystem): boolean {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This predicate is the same test useTypedDate.ts keeps inline at lines 117 and 221 (calendar === 'gregory' || calendar === 'iso8601'). Please call isGregorianCalendar(calendar) and isGregorianCalendar(providerCalendar) there, so the native-control rule and the typed-entry rule share one definition and cannot drift apart.


describe('DateInput surface in a calendar', () => {
it.each(CASES)(
'%s in %s on a %s pointer shows the %s',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this title format receives [name, props, calendar, pointer, surface], so a case reads "native in { presentation: 'native' } on a persian pointer shows the fine" and the expected surface never appears. Dropping props from the title, or putting it last in each CASES tuple, fixes it; the DateTimeInput block at line 256 uses the same format.

@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-typed-entry branch from 2187c77 to b3b17f4 Compare November 3, 2026 23:26
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-native-fallback branch from 698fdd8 to 5576696 Compare November 3, 2026 23:26

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the spec change this pull request makes, and one record fix is needed after that.

  • To settle: current spec:AST-043 FR2 says an explicit presentation="native" always shows the native surface (and FR3 keeps nativePicker exactly as released), while this pull request rewrites FR1–FR3 and adds component:DateInput FR18 and component:DateTimeInput FR12 so that, outside gregory and iso8601, those values and the default show the Astryx popover or bottom sheet (for the time control too) and an explicit native warns, citing spec:AST-111 FR15 and DEC-7, which are still draft and not on main.
  • Required fix: the new calendar requirement takes the id component:DateInput FR18, which the current DateInput record on main already gives to the wheel accent-mark requirement, so give it the next free id when the stack rebases onto main and update its references in both records.
  • Non-blocking, from the base branch: apps/storybook/stories/DateInput.stories.tsx imports InternationalizationProvider twice, so Storybook does not start and the new CalendarSystemPresentations story cannot render until that is fixed.

Any engineering owner, the author included if they are one, can record approval of the spec change by commenting /approve-spec with the full head commit SHA. The earlier shared Gregorian-test finding is fixed.

[Automated review]

| FR15 | Under a coarse primary pointer, a sheet wheel's pan takes a trackpad's two-finger scroll, as `spec:AST-094` FR43 allows a record to grant: the rows follow the fingers, coast on at the lift with the fingers' last speed, and rest on a row by FR13. A mouse-wheel notch turns the wheel one row, as an arrow key does, with no coast. A ctrl-scroll stays the page's zoom (`spec:AST-094` FR43). Implementation gap: the wheel is the browser's scroll-snap column for both inputs, so a trackpad's momentum runs at the browser's rate and a mouse-wheel notch moves the column by the browser's scroll step, several rows. | `spec:AST-094` FR43; current source |
| FR16 | Enter in the pointer field's text input commits typed text that has not been committed and is then held back, so a form never submits the value from before the commit. With no typed text pending, Enter is not prevented, so a form submits as it does from any text field, except on a disabled or busy field, where Enter does nothing (`spec:AST-085` FR2). |
| FR17 | The pointer field reads and writes typed dates in the resolved calendar (`spec:AST-111` FR2), and its Calendar shows that calendar. It reads the dates `Intl.DateTimeFormat` writes for the locale and calendar, in any Unicode decimal digits and with month and era names of the locale and English; in the Gregorian calendar, text that matches none of these forms, or that these forms read as a date the calendar does not have, still commits on Enter or blur when `parseDateInput` reads it, so `13/5/2026` in `en-US` commits as 13 May 2026 (`spec:AST-111` FR9). A typed year is a year of the calendar (`spec:AST-111` FR10). It rejects a date the calendar does not have and never adjusts it; a typed date outside `min`, `max`, or `dateConstraints` shows and announces an out-of-range error that writes the bounds in the calendar, and Enter or blur keeps both kinds of rejected text so the person can correct it, while unreadable text reverts (`spec:AST-111` FR11). While a person types, `onChange` fires only for complete input, at most once for each distinct value in one typing session, and a one-digit day stays open until another digit, Enter, or blur, so a day the month lacks is never reported as another date; a two-digit year and input without a year commit on Enter or blur, in every calendar including Gregorian, and a one-digit year is not a date: like other text the field cannot finish, Enter or blur keeps it and shows the unreadable message as the field status (`spec:AST-111` FR12, AR3). Each rejection is announced once: a shown status announces itself, and the field's alert carries only a rejection that no status shows. `date`, `date_long`, and `date_weekday` write the committed text in the calendar and read back as the same date; `system_date` stays Gregorian ISO and the field reads ISO input with it (`spec:AST-111` FR13). Text from a custom `format` function that the field cannot read back cannot be re-committed after an edit (`spec:AST-111` FR14). Values stay Gregorian ISO dates (`spec:AST-111` FR3). | `spec:AST-111` FR3, FR9–FR14; current source; parser, round-trip, and calendar typed-entry tests |
| FR18 | With a calendar other than `gregory` or `iso8601`, every presentation that would show the native control — `adaptive-native`, the default, deprecated `touch` and `always`, and an explicit `native` — shows the popover on a fine pointer and the bottom sheet on a coarse pointer, because the native control is Gregorian (`spec:AST-111` FR15). An explicit `native` also warns once in development. The bottom sheet shows Gregorian dates (Current-state impact). Values stay Gregorian ISO dates (`spec:AST-111` FR3). | `spec:AST-111` FR3, FR15; current source; calendar presentation and no-`Temporal` tests |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current DateInput record on main already has an FR18 ("While a wheel coasts, snaps or turns, no row carries the selection band's accent mark"), and FR17 is the sheet wheel's key order. Please give this calendar requirement the next free id when the stack rebases onto main, and update its references in this record (FR2, the Behavior and Compatibility rows, ORD1, the AST-111 link, verification, Current-state impact) and in the DateTimeInput record.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the spec change this pull request makes, and one record fix is needed after that.

  • To settle: current spec:AST-043 FR2 says an explicit presentation="native" always shows the native surface (and FR3 keeps nativePicker exactly as released), while this pull request rewrites FR1–FR3 and adds component:DateInput FR18 and component:DateTimeInput FR12 so that, outside gregory and iso8601, those values and the default show the Astryx popover or bottom sheet (for the time control too) and an explicit native warns, citing spec:AST-111 FR15 and DEC-7, which are still draft and not on main; the owner also says whether architecture:public-component-api INV16, which lets a caller's explicit presentation choice win, needs a calendar exception.
  • Required fix: the new calendar requirement takes the id component:DateInput FR18, which the current DateInput record on main already gives to the wheel accent-mark requirement, so give it the next free id when the stack rebases onto main and update its references in both records.
  • Non-blocking: the calendar JSDoc in DateInput.tsx and the changeset say only the bottom sheet's months stay Gregorian, but on a touch screen the closed field also shows a Gregorian date; say that the field and its bottom sheet show Gregorian dates there.

Any engineering owner, the author included if they are one, can record approval of the spec change by commenting /approve-spec with the full head commit SHA.

[Automated review]

| FR15 | Under a coarse primary pointer, a sheet wheel's pan takes a trackpad's two-finger scroll, as `spec:AST-094` FR43 allows a record to grant: the rows follow the fingers, coast on at the lift with the fingers' last speed, and rest on a row by FR13. A mouse-wheel notch turns the wheel one row, as an arrow key does, with no coast. A ctrl-scroll stays the page's zoom (`spec:AST-094` FR43). Implementation gap: the wheel is the browser's scroll-snap column for both inputs, so a trackpad's momentum runs at the browser's rate and a mouse-wheel notch moves the column by the browser's scroll step, several rows. | `spec:AST-094` FR43; current source |
| FR16 | Enter in the pointer field's text input commits typed text that has not been committed and is then held back, so a form never submits the value from before the commit. With no typed text pending, Enter is not prevented, so a form submits as it does from any text field, except on a disabled or busy field, where Enter does nothing (`spec:AST-085` FR2). |
| FR17 | The pointer field reads and writes typed dates in the resolved calendar (`spec:AST-111` FR2), and its Calendar shows that calendar. It reads the dates `Intl.DateTimeFormat` writes for the locale and calendar, in any Unicode decimal digits and with month and era names of the locale and English; in the Gregorian calendar, text that matches none of these forms, or that these forms read as a date the calendar does not have, still commits on Enter or blur when `parseDateInput` reads it, so `13/5/2026` in `en-US` commits as 13 May 2026 (`spec:AST-111` FR9). A typed year is a year of the calendar (`spec:AST-111` FR10). It rejects a date the calendar does not have and never adjusts it; a typed date outside `min`, `max`, or `dateConstraints` shows and announces an out-of-range error that writes the bounds in the calendar, and Enter or blur keeps both kinds of rejected text so the person can correct it, while unreadable text reverts (`spec:AST-111` FR11). While a person types, `onChange` fires only for complete input, at most once for each distinct value in one typing session, and a one-digit day stays open until another digit, Enter, or blur, so a day the month lacks is never reported as another date; a two-digit year and input without a year commit on Enter or blur, in every calendar including Gregorian, and a one-digit year is not a date: like other text the field cannot finish, Enter or blur keeps it and shows the unreadable message as the field status (`spec:AST-111` FR12, AR3). Each rejection is announced once: a shown status announces itself, and the field's alert carries only a rejection that no status shows. `date`, `date_long`, and `date_weekday` write the committed text in the calendar and read back as the same date; `system_date` stays Gregorian ISO and the field reads ISO input with it (`spec:AST-111` FR13). Text from a custom `format` function that the field cannot read back cannot be re-committed after an edit (`spec:AST-111` FR14). Values stay Gregorian ISO dates (`spec:AST-111` FR3). | `spec:AST-111` FR3, FR9–FR14; current source; parser, round-trip, and calendar typed-entry tests |
| FR18 | With a calendar other than `gregory` or `iso8601`, every presentation that would show the native control — `adaptive-native`, the default, deprecated `touch` and `always`, and an explicit `native` — shows the popover on a fine pointer and the bottom sheet on a coarse pointer, because the native control is Gregorian (`spec:AST-111` FR15). An explicit `native` also warns once in development. The bottom sheet shows Gregorian dates (Current-state impact). Values stay Gregorian ISO dates (`spec:AST-111` FR3). | `spec:AST-111` FR3, FR15; current source; calendar presentation and no-`Temporal` tests |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current DateInput record on main already has an FR18 ("While a wheel coasts, snaps or turns, no row carries the selection band's accent mark"), and FR17 is the sheet wheel's key order. Please give this requirement the next free id when the stack rebases onto main, and update its references here (Behavior and Compatibility rows, the contract row, FR2, ORD1, the AST-111 link, verification and the Current-state gap) and in DateTimeInput.spec.md.

* The native date control is Gregorian, so with a calendar other than
* `gregory` or `iso8601` every presentation that would show it uses the
* popover on a fine pointer and the bottom sheet on a coarse pointer. The
* bottom sheet's months and wheels stay Gregorian.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: on a coarse pointer the closed field also shows a Gregorian date (the sheet's field text is Gregorian), while the same field shows the calendar on a fine pointer. Suggested wording: "On a coarse pointer the field and its bottom sheet show Gregorian dates." The changeset says the same narrower thing.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the spec change this pull request makes, and one record fix is needed after that.

  • To settle: current spec:AST-043 FR2 says an explicit presentation="native" always shows the native surface (and FR3 keeps nativePicker resolving exactly as released), while this pull request rewrites FR1–FR3 and adds component:DateInput FR21 and component:DateTimeInput FR12 so that, outside gregory and iso8601, those values and the default show the Astryx popover or bottom sheet (for the time control too) and an explicit native warns, citing spec:AST-111 FR15 and DEC-7, which are still draft and not on main; the owner also says whether architecture:public-component-api INV16, which lets a caller's explicit presentation choice win, needs a calendar exception.
  • Required fix: the DateInput record's Compatibility/readiness row (DateInput.spec.md:71) drops the current sentences about the sheet wheels' markup and time-order keys and lists "the touch wheels' scroll input", which no longer has a Current-state entry, so start from the base branch's row and change only "the calendar on the touch and native surfaces" to "the calendar on the touch surface".

Non-blocking:

  • Miss: the DateTimeInput record's Public contract row says the calendar shows "on every surface", but FR12 says the sheet's Date panel stays Gregorian; "the date segment and its popover show" matches it.
  • The calendar JSDoc in DateInput.tsx and the changeset say only the bottom sheet's months stay Gregorian, but on a touch screen the closed field also shows a Gregorian date.
  • Miss: the dense nativePicker docs in both .doc.mjs files still say "still works as released" with no calendar note.
  • The description still names DateInput FR17 and DateTimeInput FR11; the records now add FR21 and FR12.

Any engineering owner, the author included if they are one, can record approval of the spec change by commenting /approve-spec with the full head commit SHA.

[Automated review]

| Behavior | `presentation` selects the picker surface; an omitted value is `adaptive-native`; `presentation` wins over deprecated `nativePicker`; every committed path emits the same controlled ISO-date value and action feedback. The pointer field reads and writes typed dates in the resolved calendar and reports a typed date only when it is complete (FR20). With a calendar other than `gregory` or `iso8601`, a presentation that would show the native control shows the popover on a fine pointer and the bottom sheet on a coarse pointer (FR21). |
| End-user impact | People type or pick one date using a surface suited to the primary pointer, in the calendar the application chooses. Disabled and busy fields stay focusable; a busy field keeps its ordinary paint with a Spinner while new commits are blocked. |
| Builder impact | Optional: set `calendar` on the field or its provider, and `min` and `max` on Buddhist and Minguo calendar fields. `changeAction` runs after `onChange` with optimistic busy feedback on every surface. |
| Compatibility/readiness | `calendar` is additive and the default stays Gregorian. Typed Gregorian entry fires `onChange` only for complete input and keeps an out-of-range date with its error instead of reverting it; text that `parseDateInput` reads still commits on Enter or blur. Calendars that need `Temporal` fall back to Gregorian where it is missing (the `spec:AST-013` FR12 exception). Caller handlers while disabled, fixed field height, a clear control that drops focus, month paging in the touch calendar, the touch wheels' scroll input, and the calendar on the touch surface are listed under Current-state impact. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This row drops two sentences the current DateInput record keeps ("Under a finger, the sheet wheels' markup changes (one strip of flat rows, faded by a layer inside the column). Under every presentation, keys step through the values in time order (FR17).") and lists "the touch wheels' scroll input", which no longer has a Current-state entry here. Please start from the base branch's row and change only "the calendar on the touch and native surfaces" to "the calendar on the touch surface".

| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Public contract | One controlled ISO date-time value presented through coordinated date and time segments; `presentation` selects Astryx, native, or adaptive picker surfaces. `calendar` selects the calendar system the date segment reads and writes (`spec:AST-111` FR2). |
| Behavior | Date and time changes emit one combined value; clear emits `undefined`; controlled empty state remains empty in every rendered picker. The pointer date segment reads and writes typed dates in the resolved calendar and reports a typed date only when it is complete (FR11). |
| Public contract | One controlled ISO date-time value presented through coordinated date and time segments; `presentation` selects Astryx, native, or adaptive picker surfaces. `calendar` selects the calendar system the date segment shows on every surface (`spec:AST-111` FR2). |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: "shows on every surface" overstates it, since FR12 and the Current-state entry say the sheet's Date panel shows Gregorian dates. Suggested: "calendar selects the calendar system the date segment and its popover show (spec:AST-111 FR2)."

@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-typed-entry branch from 6317ada to b178ad7 Compare November 4, 2026 19:47

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the spec change this pull request makes; no blocking code or record defect remains.

  • To settle: current spec:AST-043 FR2 says an explicit presentation="native" always shows the native surface (and FR3 keeps nativePicker resolving exactly as released), while this pull request rewrites FR1–FR3 and adds component:DateInput FR21 and component:DateTimeInput FR12 so that, outside gregory and iso8601, those values and the default show the Astryx popover or bottom sheet (the time control too) and an explicit native warns; the cited spec:AST-111 FR15 and DEC-7 are on main but still draft, and the owner also says whether architecture:public-component-api INV16 needs the same calendar exception.

The DateInput Compatibility/readiness row now keeps both sheet-wheel sentences, which resolves the earlier record finding.

Non-blocking:

  • The consumer docs for calendar (DateInput.doc.mjs, DateTimeInput.doc.mjs) name only the bottom sheet as Gregorian, while the calendar JSDoc and the changeset say that on a touch screen the closed field shows Gregorian dates too.

The earlier /approve-spec named a previous head, and an approval counts only for the head it names. Any engineering owner, the author included if they are one, records approval by commenting /approve-spec 81b9cce7348a5d8ddb7c946b4bf360bf93edd258 on this pull request.

[Automated review]

type: "'gregory' | 'iso8601' | 'buddhist' | 'roc' | 'japanese' | 'persian' | 'indian' | 'hebrew' | 'chinese' | 'dangi' | 'coptic' | 'ethiopic' | 'ethioaa' | 'islamic-civil' | 'islamic-tbla' | 'islamic-umalqura'",
description:
'The calendar the text field reads and writes dates in, and the calendar its popover shows. value, onChange, min, and max stay Gregorian ISO dates. People type a date the way the locale writes it in this calendar, in any decimal digits; the field reports a date only once it is complete, and names a date the calendar does not have. Years are years of this calendar: a Buddhist field reads 2026 as Buddhist year 2026, so set min and max on Buddhist and Minguo calendar fields to catch a Gregorian year typed by mistake. Calendars other than gregory, iso8601, buddhist, roc, and japanese need Temporal, native or a polyfill the application loads; without it the field shows Gregorian dates. The bottom-sheet and native surfaces show Gregorian dates.',
'The calendar the text field reads and writes dates in, and the calendar its popover shows. value, onChange, min, and max stay Gregorian ISO dates. People type a date the way the locale writes it in this calendar, in any decimal digits; the field reports a date only once it is complete, and names a date the calendar does not have. Years are years of this calendar: a Buddhist field reads 2026 as Buddhist year 2026, so set min and max on Buddhist and Minguo calendar fields to catch a Gregorian year typed by mistake. Calendars other than gregory, iso8601, buddhist, roc, and japanese need Temporal, native or a polyfill the application loads; without it the field shows Gregorian dates. With a calendar other than gregory or iso8601, a presentation that would show the native date control shows the popover on a fine pointer and the bottom sheet on a coarse pointer, because the native control is Gregorian. The bottom sheet shows Gregorian dates.',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: on a touch screen the closed field also shows a Gregorian date, as the calendar JSDoc and the changeset say. Suggested ending: "On a coarse pointer the field and its bottom sheet show Gregorian dates."

type: "'gregory' | 'iso8601' | 'buddhist' | 'roc' | 'japanese' | 'persian' | 'indian' | 'hebrew' | 'chinese' | 'dangi' | 'coptic' | 'ethiopic' | 'ethioaa' | 'islamic-civil' | 'islamic-tbla' | 'islamic-umalqura'",
description:
'The calendar the date segment reads and writes typed dates in, and the calendar its popover shows. value, onChange, min, and max stay Gregorian ISO datetimes. People type a date the way the locale writes it in this calendar, in any decimal digits; the field reports a date only once it is complete, and names a date the calendar does not have. Years are years of this calendar, so set min and max on Buddhist and Minguo calendar fields to catch a Gregorian year typed by mistake. Calendars other than gregory, iso8601, buddhist, roc, and japanese need Temporal, native or a polyfill the application loads; without it the field shows Gregorian dates. The native and bottom-sheet surfaces show Gregorian dates.',
'The calendar the date segment reads and writes typed dates in, and the calendar its popover shows. value, onChange, min, and max stay Gregorian ISO datetimes. People type a date the way the locale writes it in this calendar, in any decimal digits; the field reports a date only once it is complete, and names a date the calendar does not have. Years are years of this calendar, so set min and max on Buddhist and Minguo calendar fields to catch a Gregorian year typed by mistake. Calendars other than gregory, iso8601, buddhist, roc, and japanese need Temporal, native or a polyfill the application loads; without it the field shows Gregorian dates. With a calendar other than gregory or iso8601, a presentation that would show native controls shows the popovers on a fine pointer and the bottom sheet on a coarse pointer, because the native date control is Gregorian. The Date panel of the bottom sheet shows Gregorian dates.',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: on a touch screen the closed date segment also shows a Gregorian date. Suggested ending: "On a coarse pointer the field and the Date panel of its bottom sheet show Gregorian dates."

@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-typed-entry branch from cfeae70 to 62018f3 Compare November 5, 2026 00:58
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-native-fallback branch from 81b9cce to ac999fe Compare November 5, 2026 00:58
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec ac999fe

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet, because it runs only for pull requests that target main or a release branch.

An engineering owner approved this head's calendar exception (spec:AST-043 FR1–FR3, component:DateInput FR21, component:DateTimeInput FR12), the new tests fail on the base and pass on the head, and no blocking defect was found.

  • Non-blocking: the Chinese calendar docs (DateInput.doc.mjs:540, DateTimeInput.doc.mjs:551) still name only the bottom sheet, while the English docs now say the closed field is Gregorian on a coarse pointer too.
  • Non-blocking: DateTimeInput's calendar JSDoc does not mention the calendar exception that DateInput's JSDoc states.

[Automated review]

type: "'gregory' | 'iso8601' | 'buddhist' | 'roc' | 'japanese' | 'persian' | 'indian' | 'hebrew' | 'chinese' | 'dangi' | 'coptic' | 'ethiopic' | 'ethioaa' | 'islamic-civil' | 'islamic-tbla' | 'islamic-umalqura'",
description:
'文本字段读写日期所用的历法,也是其弹出日历显示的历法。value、onChange、min 和 max 始终为公历 ISO 日期。用户按当前语言区域在该历法中的写法输入日期,可使用任意十进制数字;只有输入完整时字段才会报告日期,并会指出该历法中不存在的日期。年份是该历法的年份:佛历字段把 2026 读作佛历 2026 年,因此请为佛历和民国纪年字段设置 min 和 max,以发现误输入的公历年份。gregory、iso8601、buddhist、roc 和 japanese 以外的历法需要 Temporal(原生或由应用加载的 polyfill);没有 Temporal 时字段显示公历日期。底部选择器和原生选择器显示公历日期。',
'文本字段读写日期所用的历法,也是其弹出日历显示的历法。value、onChange、min 和 max 始终为公历 ISO 日期。用户按当前语言区域在该历法中的写法输入日期,可使用任意十进制数字;只有输入完整时字段才会报告日期,并会指出该历法中不存在的日期。年份是该历法的年份:佛历字段把 2026 读作佛历 2026 年,因此请为佛历和民国纪年字段设置 min 和 max,以发现误输入的公历年份。gregory、iso8601、buddhist、roc 和 japanese 以外的历法需要 Temporal(原生或由应用加载的 polyfill);没有 Temporal 时字段显示公历日期。使用 gregory 或 iso8601 以外的历法时,原本显示原生日期控件的呈现会在精细指针上显示弹出层、在粗指针上显示底部选择器,因为原生控件只显示公历。底部选择器显示公历日期。',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the English entry now says that on a coarse pointer the field and its bottom sheet show Gregorian dates; this one still names only the sheet. Suggested ending: "在粗指针上,字段及其底部选择器显示公历日期。"

type: "'gregory' | 'iso8601' | 'buddhist' | 'roc' | 'japanese' | 'persian' | 'indian' | 'hebrew' | 'chinese' | 'dangi' | 'coptic' | 'ethiopic' | 'ethioaa' | 'islamic-civil' | 'islamic-tbla' | 'islamic-umalqura'",
description:
'日期部分读写输入日期所用的历法,也是其弹出日历显示的历法。value、onChange、min 和 max 始终为公历 ISO 日期时间。用户按当前语言区域在该历法中的写法输入日期,可使用任意十进制数字;只有输入完整时字段才会报告日期,并会指出该历法中不存在的日期。年份是该历法的年份,因此请为佛历和民国纪年字段设置 min 和 max,以发现误输入的公历年份。gregory、iso8601、buddhist、roc 和 japanese 以外的历法需要 Temporal(原生或由应用加载的 polyfill);没有 Temporal 时字段显示公历日期。原生选择器和底部选择器显示公历日期。',
'日期部分读写输入日期所用的历法,也是其弹出日历显示的历法。value、onChange、min 和 max 始终为公历 ISO 日期时间。用户按当前语言区域在该历法中的写法输入日期,可使用任意十进制数字;只有输入完整时字段才会报告日期,并会指出该历法中不存在的日期。年份是该历法的年份,因此请为佛历和民国纪年字段设置 min 和 max,以发现误输入的公历年份。gregory、iso8601、buddhist、roc 和 japanese 以外的历法需要 Temporal(原生或由应用加载的 polyfill);没有 Temporal 时字段显示公历日期。使用 gregory 或 iso8601 以外的历法时,原本显示原生控件的呈现会在精细指针上显示弹出层、在粗指针上显示底部面板,因为原生日期控件只显示公历。底部面板的日期页显示公历日期。',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the English entry now names the closed field too. Suggested ending: "在粗指针上,字段及其底部面板的日期页显示公历日期。"

@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-typed-entry branch from 62018f3 to 9e071b2 Compare November 5, 2026 02:27
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-native-fallback branch from ac999fe to e460c55 Compare November 5, 2026 02:27
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec e460c55

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet, because it runs only for pull requests that target main or a release branch.

An engineering owner approved this head's calendar exception (spec:AST-043 FR1–FR3, component:DateInput FR21, component:DateTimeInput FR12), the new presentation tests fail on the base and pass on the head, and no blocking defect was found.

  • Non-blocking: the Chinese calendar docs (DateInput.doc.mjs:540, DateTimeInput.doc.mjs:551) still name only the bottom sheet, while the English docs say the closed field is Gregorian on a coarse pointer too.
  • Non-blocking: DateTimeInput's calendar JSDoc does not mention the calendar exception that DateInput's JSDoc states.
  • Miss: non-blocking, the development warning for an explicit native (useCalendarPresentation.ts:50-53) says the picker shows the field's calendar, but on a coarse pointer the bottom sheet still shows Gregorian dates until #9794 lands.

[Automated review]

Comment on lines +50 to +53
`presentation="native" shows the Astryx picker in the "${calendar}" ` +
'calendar, because the native date control shows only Gregorian ' +
'dates: the popover on a fine pointer and the bottom sheet on a ' +
'coarse pointer.',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miss, non-blocking: at this head the coarse-pointer bottom sheet shows Gregorian dates (component:DateInput FR21, Current-state impact), so "shows the Astryx picker in the "persian" calendar" overstates it on a phone. Until #9794 lands, suggested: presentation="native" uses the Astryx picker for the "${calendar}" calendar, because the native date control shows only Gregorian dates: the popover on a fine pointer and the bottom sheet on a coarse pointer.

@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-native-fallback branch from e460c55 to e812cfa Compare November 5, 2026 02:53
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec e812cfa

…ryx picker

The native date control shows only Gregorian dates. In a calendar other than gregory or iso8601, native and adaptive-native use the popover on a fine pointer and the bottom sheet on a coarse pointer, and an explicit native warns in development. AST-043 FR1 and FR3 name the exception.
…g and presentation

useTypedDate calls isGregorianCalendar, the same test that decides when the native control can show the calendar. The presentation test names read the expected surface, and the warning comment says what keys it. The provider docs and record say that only the bottom sheet stays Gregorian, and the changeset says that an explicit -u-ca- locale selects the calendar the same way.
The changeset says that a provider locale with a -u-ca- keyword keeps
Gregorian dates and the native control; set calendar to choose a
calendar.
… narrow the calendar surface claims

DateInput's compatibility row keeps the sheet wheels' markup and time-order key sentences (FR17) and changes only the touch-surface calendar entry. DateTimeInput's calendar shows in the date segment and its popover. On a coarse pointer the field and its bottom sheet show Gregorian dates. The dense nativePicker docs name the calendar exception.
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-native-fallback branch from e812cfa to 5eb98bf Compare November 5, 2026 03:08
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec 5eb98bf

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet, because it runs only for pull requests that target main or a release branch.

An engineering owner approved this head's calendar exception (spec:AST-043 FR1–FR3, component:DateInput FR21, component:DateTimeInput FR12); the new presentation tests fail on the base and pass on the head, and no blocking defect was found.

  • Non-blocking: the Chinese calendar docs (DateInput.doc.mjs:540, DateTimeInput.doc.mjs:551) still name only the bottom sheet, while the English docs say the closed field is Gregorian on a coarse pointer too.
  • Non-blocking: DateTimeInput's calendar JSDoc does not mention the calendar exception that DateInput's JSDoc states.
  • Non-blocking: the development warning for an explicit native (useCalendarPresentation.ts:50-53) says the picker shows the field's calendar, but on a coarse pointer the bottom sheet still shows Gregorian dates until it follows the calendar.

[Automated review]

@nynexman4464
nynexman4464 merged commit 5eb98bf into nynexman4464/feat/calendar-typed-entry Nov 5, 2026
8 checks passed
@nynexman4464

Copy link
Copy Markdown
Contributor Author

GitHub marks this as merged because its base branch (#9643's) now contains it: #9643 lands this change together with the rest of the typed-entry stack. Nothing reached main from here; this pull request's description is reproduced in #9643 as its own part.

This branch was successfully deployed

1 active deployment
Preview — 5eb98bfe Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant