Skip to content

fix(DateInput, DateTimeInput): keep typed text while disabled or busy - #9842

Merged
nynexman4464 merged 48 commits into
mainfrom
nynexman4464/fix/datetime-disabled-drops-draft
Nov 5, 2026
Merged

nynexman4464 merged 48 commits into
mainfrom
nynexman4464/fix/datetime-disabled-drops-draft

Conversation

@nynexman4464

@nynexman4464 nynexman4464 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Stack: #9643 → #9842

Declared stack: this pull request targets main and contains #9643; review only its own commits (the ones above #9643). The stack lands together.

User impact

A person types into a DateInput or the date segment of a DateTimeInput, and the field becomes disabled or busy (isDisabled, isLoading, or a pending changeAction) before Enter or blur. The two fields disagree about that text:

  • DateInput drops it: Enter or blur throws away what the person typed and shows the old value.
  • DateTimeInput judges it: Enter or blur runs the normal commit, so unfinished text such as 3/15/2 shows "Invalid date" and aria-invalid on a field the person cannot edit.

After this change both fields keep the text and ignore Enter and blur while disabled or busy, with no onChange and no typed rejection. Once the field is editable again:

  • text whose date typing never reported waits for the next Enter or blur, which commits or rejects it as usual;
  • text whose date typing already reported through onChange gives way to the field's value, whether or not the change took it. When the lock ends without focus, this happens at once. When the field has focus, the text stays under the caret until the next Enter or blur, which ends the typing session, so the lock never rewrites in-progress text (DateInput FR6).

A new value from the application still replaces the text, busy or not. A failed changeAction save is not a new value: in a focused field the reported text stays until the next Enter or blur, in DateTimeInput as in DateInput.

Problem and solution fit

  • Why does it happen? useTypedDateField handled a commit in a disabled or busy field in two ways, chosen by a dropsDraftWhenDisabled option: DateInput reset the text, DateTimeInput ran the normal commit.
  • Why does it hurt the task? Dropping loses input the person typed through no action of theirs; judging shows an error the person cannot act on.
  • Why does that matter? Losing input and showing errors on a locked field both break trust in the form, and two fields of the same family disagree about the same state.

A disabled or busy field now ignores the commit: the text stays, and the typed rejection is hidden until the field is editable. When the lock ends, text whose date typing already reported gives way to the field's value, so the field shows what the change left; in a focused field that happens on the next Enter or blur. The option is removed.

Rule for a rejection already shown when the field locks: it is hidden while the field is disabled or busy, and it shows again when the field is editable and still holds that text. A locked field cannot change the text, so the rejection that returns is the one the text already had.

Library Typed text when the field locks before commit Error while locked
Native <input> Kept —
React Aria Kept; commit and blur return early None
MUI X Kept Shown
Mantine, Ant Design, Fluent UI Dropped, as a side effect of the blur reset None

Expected behavior and authority

  • spec:AST-085 FR2: a disabled control does not change on any path.
  • component:DateInput FR12 and component:DateTimeInput FR9: a disabled or busy field blocks every value-changing path. Neither requires dropping text the person typed.
  • This pull request adds the rule to both records: DateInput FR12 and a new DateTimeInput FR13, which follows DateInput FR12, each with a verification row.

Compatibility (spec:AST-017): nonbreaking interaction fix under FR5. The value contract is unchanged: onChange still never fires while the field is disabled or busy, and a new value still replaces typed text. Only the typed text and its error change: DateInput no longer drops never-reported text, DateTimeInput no longer shows its error while locked, and in both fields reported text gives way to the field's value once the field is editable, on the next Enter or blur if it has focus.

Smallest restoration

  • useTypedDateField returns early from a commit while the field is disabled or busy, and reports no typed rejection while locked.
  • When the lock ends while the field has no focus, it drops typed text whose date matches the date typing last reported, so the field shows its value. A focused field keeps that text; the next Enter or blur commits it, which reports nothing for an already reported date and shows the value.
  • The dropsDraftWhenDisabled option and both call-site arguments are removed.
  • DateTimeInput passes its committed date to the hook as value, as DateInput passes its committed value, and the optimistic date only as shownValue. Before, the revert of a failed save looked like a new value and replaced the focused field's text.
  • No public API or visual change.

Evidence

  • Reproduction before the change: on the base branch, DateInput drops 3/15/2 on Enter or blur while locked; DateTimeInput shows "Invalid date" and aria-invalid; both drop or reject the text rather than keeping it for the next commit. The red run (13 of the first 17 cases failed) predates the reported-text cases and was not repeated.
  • Result after the change: all pass. While locked, the text stays 3/15/2 with no onChange, no aria-invalid, and no "Invalid date"; once editable, blur shows "Invalid date" with the text kept. A date with a two-digit year typed before the lock (3/15/26), which typing does not report, fires onChange once, on the first blur once editable. A complete date typed before the lock (3/15/2026), which typing already reported, gives way to the field's value when the lock ends: the old value when the change did not take it, the new one when it did. When the lock ends while the field has focus, the text stays until the next Enter or blur, then shows the value, with no second onChange.
  • Representative unchanged path: a new value while locked replaces the text (4 cases, pass before and after), and the disabled, busy, Enter, and rejection cases while editable pass unchanged.
  • Regression test or other mutation-sensitive proof: "typed text while the field is disabled or busy" in DateInput.test.tsx and DateTimeInput.test.tsx, 19 cases each (isLoading and isDisabled each: ignored commit then rejection once editable; a shown rejection hidden and restored; an unreported date committed once editable; a new value while locked; reported text giving way to the old value or to the new one when the lock ends; reported text kept in the focused field when the lock ends, until blur and until Enter; plus a changeAction save that fails or succeeds, and a failed save in a focused field). The 8 focused-field lock cases fail against the previous source, which reset the text under the caret. The focused failed-save case fails in DateTimeInput when the hook gets the optimistic date as value, and passes in DateInput before and after. DateInput's "keeps a cleared draft without committing it when the field becomes disabled (AST-085 FR2)" now also asserts the cleared text stays.

Screenshots

Real Chromium against Storybook (DateTimeInput and DateInput "With value"). Each clip types 3/15/2, sets isLoading, presses Tab, then sets the field editable again and tabs out of the date. Left: #9837 (before). Right: this change.

Top: while busy, before shows Invalid date for DateTimeInput and drops the text for DateInput; after keeps 3/15/2 with no error. Bottom: once editable, after shows Invalid date with the text kept.

Video (WebM, 12 s): before-after.webm

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm exec vitest run --maxWorkers=2 over DateInput.test.tsx, DateTimeInput.test.tsx and docPropLiterals.test.ts: 3 files, 324 tests passed, including the 39 new or changed cases. CI runs the full suites.

  • Red run with the base branch's sources, before the reported-text cases were added: 13 of the 17 cases then in the suite failed; the 4 new-value cases passed, since they guard behavior that already worked. The 8 focused-field cases fail with the hook's previous lock-end reset.

  • pnpm exec tsc --noEmit -p packages/core: passed.

  • eslint on the changed files: passed.

  • pnpm check:knowledge and pnpm check:changesets: passed.

  • node scripts/pre-review.mjs --base nynexman4464/refactor/typed-entry-shared-hook: 567 authored lines.

  • Real browser: the clip above covers never-reported text in Chromium. Reported text giving way when the lock ends, and kept in a focused field until Enter or blur, has unit tests only.

Writing rubric results

Records: component:DateInput (FR12 gains three sentences; one verification row) and component:DateTimeInput (new FR13; one verification row).

  • FR12's give-way sentence says a focused field keeps the text until the next Enter or blur.

  • R1 narration: none; the added sentences state present behavior.

  • R2 research: none in the records; the prior-art comparison is only in this description.

  • R3 evidence: none found; the basis cites spec:AST-085 FR2 and current tests, and the verification rows name test cases.

  • R4 rejected alternatives: none.

  • R5 change references: none.

  • R6 open questions: none added.

@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 4:49am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 3, 2026
@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, 4:58 AM UTC

@nynexman4464
nynexman4464 force-pushed the nynexman4464/refactor/typed-entry-shared-hook branch from be8e6e7 to 961c512 Compare November 4, 2026 00:19
@nynexman4464
nynexman4464 force-pushed the nynexman4464/fix/datetime-disabled-drops-draft branch from 5f3676b to 25a53e2 Compare November 4, 2026 00:19

@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.

Changes requested: dropping typed text on a disabled or busy commit fixes the lingering "Invalid date" in DateTimeInput, but the new early return also stops a retyped date from being reported.

  • In packages/core/src/DateInput/useTypedDate.ts (lines 383-387), the disabled branch calls reset() without clearing lastFiredRef, so when onChange reports a typed date, the field turns busy or disabled while the app keeps the old value (for example after a failed save), and the person tabs out, retyping that same date later fires no onChange and the blur restores the old date, where DateTimeInput reported it before this change.

Setting lastFiredRef.current = undefined before reset() in that branch fixes DateTimeInput and DateInput, which has the same gap today; please add a test that retypes a reported date after a busy blur. The description could also mention that a busy blur drops rejected text kept by an earlier enabled blur.

[Automated review]

// A disabled or busy field keeps its value and drops the draft.
if (isDisabled && dropsDraftWhenDisabled) {
// Text typed before the field became disabled or busy never commits.
if (isDisabled) {

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 branch drops the text but keeps lastFiredRef, which the enabled path clears at line 408. After typing reports a date and the app turns the field busy without taking it (a failed save, say), a blur here leaves that date recorded, so retyping it later fires no onChange and the next blur restores the old value. Clearing it here fixes both fields:

if (isDisabled) {
  lastFiredRef.current = undefined;
  reset();
  return;
}

@nynexman4464 nynexman4464 changed the title fix(DateTimeInput): drop typed text on a commit while disabled or busy fix(DateInput, DateTimeInput): keep typed text while disabled or busy Nov 4, 2026

@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 on the typed-text rule this pull request adds to component:DateInput FR12 and a new component:DateTimeInput FR13, and three issues need fixing either way.

The current records do not state that a disabled or busy field keeps typed text without a rejection (DateInput reverts unparseable typed text on commit, and DateTimeInput reverts rejected edits), so an engineering owner records the decision by commenting /approve-spec with the full head commit SHA, and the author may do this as an engineering owner. The decision should also say whether kept text in a field that has lost focus is judged once the field is editable, or waits for the next focus and blur as it does now.

Blocking findings

  • useTypedDate.ts:387 keeps text whose date typing already reported, so in a DateInput with a changeAction, typing 3/15/2026 and pressing Tab during the save leaves the raw 3/15/2026 in the closed field after the save, even when the save failed and the value is still the old date.
  • The same early return keeps the typing session's reported date, so after a failed save while isLoading, retyping that date fires no onChange and the field returns to the old date, which is a regression for DateTimeInput.
  • The changeset says the text commits "on the next Enter or blur once editable" and that "A new value still replaces it", but the tests cover only a two-digit year that typing never reports, and neither statement holds for a complete date.

Ending the typing session in the locked branch when the kept text's date is the one typing already reported (clear lastFiredRef, then reset) fixes the first two; please add complete-date cases for isLoading and for a changeAction save.

[Automated review]

// A disabled or busy field keeps its value and drops the draft.
if (isDisabled && dropsDraftWhenDisabled) {
reset();
if (pendingInput === null || isDisabled) {

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 keeps text whose date typing already reported, along with lastFiredRef. In a DateInput with a changeAction, typing 3/15/2026 and pressing Tab during the save leaves 3/15/2026 in the closed field after the save (even a failed one). After a failed save with isLoading, retyping that date fires no onChange. Suggest ending the session here for reported text:

if (isDisabled) {
  const locked = pendingInput.trim() ? typedDate.parse(pendingInput) : null;
  if (locked?.kind === 'value' && plainDateToISO(locked.date) === lastFiredRef.current) {
    lastFiredRef.current = undefined;
    reset();
  }
  return;
}

'@astryxdesign/core': patch
---

[fix] DateInput and DateTimeInput keep typed text, without an error, while disabled or busy, and commit it on the next Enter or blur once editable. A new value still replaces it.

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.

"commit it on the next Enter or blur once editable" and "A new value still replaces it" hold only for text that typing never reported, which is all the tests cover (3/15/26). For a complete date, the next Enter reverts the text, and a value equal to the typed date keeps it. Once the hook is fixed, suggest: "keep typed text that has not reported a date, without an error, while disabled or busy, and commit it on the next Enter or blur once editable".

@nynexman4464
nynexman4464 marked this pull request as ready for review November 4, 2026 01:59
@nynexman4464
nynexman4464 force-pushed the nynexman4464/refactor/typed-entry-shared-hook branch from 961c512 to d05ad0c Compare November 4, 2026 18:42
@nynexman4464
nynexman4464 force-pushed the nynexman4464/fix/datetime-disabled-drops-draft branch from a1ee0bb to 749c539 Compare November 4, 2026 18:43

@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 on the typed-text rule this pull request adds to component:DateInput FR12 and as a new component:DateTimeInput FR13, and two issues need fixing either way.

The current records say typed text reverts on commit; they do not say that a disabled or busy field keeps typed text, hides its rejection, or resets reported text when the lock ends. An engineering owner records the decision by commenting /approve-spec with the full head commit SHA, and the author may do this as an engineering owner. The decision should also say whether reported text gives way while the person is still in the field.

Blocking findings

  • useTypedDate.ts:360-372 resets reported text when the lock ends even while the field has focus, so a person who typed 3/15/2026 and stayed in the field sees it turn into "January 12, 2026" or "March 15, 2026" under the caret, against DateInput FR6 ("formatting MUST NOT rewrite in-progress typed text"); adding !isFocused to that condition keeps focused text until Enter or blur, and the changed test files still pass with it.
  • The changeset says "a failed save no longer leaves that text in the field, and typing the same date again reports it again", but a failed save never left the text before this change and DateTimeInput already reported a retyped date, so the sentence should end at "gives way to the field's value once the field is editable again".

Please add a test that ends the lock while the field has focus, and update the description, which still says the lock causes no reset.

[Automated review]

if (isDisabled !== wasDisabledRef.current) {
wasDisabledRef.current = isDisabled;
if (
!isDisabled &&

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 reset also runs while the person is still in the field, so a focused 3/15/2026 turns into the field's value under the caret when a save ends, against DateInput FR6 ("formatting MUST NOT rewrite in-progress typed text"). Gating it leaves focused text to the next Enter or blur, which already ends the session:

      !isDisabled &&
      !isFocused &&

Both changed test files still pass with this line.

'@astryxdesign/core': patch
---

[fix] DateInput and DateTimeInput keep typed text that has not reported a date, without an error, while disabled or busy, and commit it on the next Enter or blur once editable. A new value still replaces it. Typed text whose date `onChange` already reported gives way to the field's value once the field is editable again, so a failed save no longer leaves that text in the field, and typing the same date again reports it again.

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.

"so a failed save no longer leaves that text in the field, and typing the same date again reports it again" describes failures that never shipped: a failed save did not leave the text before this change, and DateTimeInput already reported a retyped date. Suggest ending the sentence at "gives way to the field's value once the field is editable again".

}
}

// Typing already committed a reported date through `onChange`. When the

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: "committed" clashes with this hook's commit (Enter or blur), the reset runs on any end of a lock, and the second sentence has 26 words. Suggest: "Typing already reported this date through onChange. Once the field is editable, it shows its value. A retyped date then reports again."

@nynexman4464
nynexman4464 force-pushed the nynexman4464/refactor/typed-entry-shared-hook branch from d05ad0c to d5dc7bb Compare November 4, 2026 19:47
@nynexman4464
nynexman4464 force-pushed the nynexman4464/fix/datetime-disabled-drops-draft branch from 749c539 to 8a1f429 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 on the typed-text rule this pull request adds to component:DateInput FR12 and as a new component:DateTimeInput FR13, including whether reported text gives way while the person is still in the field. An engineering owner records the decision by commenting /approve-spec with the full head commit SHA, and the author may do so as an engineering owner.

Blocking findings

  • useTypedDate.ts:360-372 resets reported text when the lock ends even while the field has focus, so a person who typed 3/15/2026 and stayed in the field sees it turn into "January 12, 2026" or "March 15, 2026" under the caret, against DateInput FR6 ("formatting MUST NOT rewrite in-progress typed text"); adding !isFocused to that condition keeps focused text until Enter or blur, and the changed test files still pass with it.
  • The changeset says "a failed save no longer leaves that text in the field, and typing the same date again reports it again", but once the person leaves the field a failed save never left the text, and released fields already report a retyped date, so the sentence should end at "gives way to the field's value once the field is editable again".

Please also add a test that ends the lock while the field has focus, and update the description, which still says the lock causes no reset.

[Automated review]

@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec 9338429

@nynexman4464
nynexman4464 force-pushed the nynexman4464/refactor/typed-entry-shared-hook branch from e1cc948 to 1766698 Compare November 4, 2026 22:55
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec ec8a80c

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · ec8a80c

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Calendar · Storybook 57.7 kB (+214 B) · 9.3 kB CSS (0) 1,714 (0) ✗ · ✓ · ✓
PowerSearch · Storybook 🔴 258.1 kB (+8.4 kB) · 22.3 kB CSS (0) 7,201 (0) ✓ · ✓ · ✓
DateInput · Storybook 🔴 163.0 kB (+8.0 kB) · 15.5 kB CSS (0) 5,611 (+508) ✓ · ✓ · ✓
6 more components
Component Size LoC Visual · A11y · RTL
DateTimeInput · Storybook 🔴 184.8 kB (+7.7 kB) · 17.2 kB CSS (0) 3,553 (−12) ✓ · ✓ · ✓
TimeInput 140.4 kB (0) · 14.5 kB CSS (0) — — · — · —
Timestamp 22.9 kB (−8 B) · 8.9 kB CSS (0) — — · — · —
DateRangeInput · Storybook 75.7 kB (−103 B) · 11.2 kB CSS (0) 684 (+17) ✓ · ✓ · ✓
lab/Comments 271.5 kB (new) · 2.5 kB CSS (new) — — · — · —
lab/CommentThread 266.4 kB (new) · 2.4 kB CSS (new) — — · — · —
Visual changes: 2 snapshots in 1 component

A change is a question for the reviewer, not a failure.

Component · story Before After Diff
Calendar · Default (neutral, light) before frame after frame diff frame
Calendar · Default (neutral, dark) before frame after frame diff frame

Package size: measured; main has no measurement of the merge base to compare yet.

API changes: cli +8 · ~1 · −0 (against the merge base's committed report); core +3 · ~0 · −0

Committed API report behind this build: cli 9 rows, core 3 rows; run pnpm api:report.

12 API changes (advisory)
Package Where Signature Usage
+ cli ./api · Types · type SearchResultEntry deprecated?: ComponentDeprecation | undefined import type {SearchResultEntry} from '@astryxdesign/cli/api'; const x: SearchResultEntry = {deprecated: …}
+ cli ./authoring · Types · interface ComponentDeprecation interface ComponentDeprecation import type {ComponentDeprecation} from '@astryxdesign/cli/authoring'
+ cli ./authoring · Types · interface MultiComponentDoc deprecated?: ComponentDeprecation import type {MultiComponentDoc} from '@astryxdesign/cli/authoring'; const x: MultiComponentDoc = {deprecated: …}
+ cli ./authoring · Types · interface SingleComponentDoc deprecated?: ComponentDeprecation import type {SingleComponentDoc} from '@astryxdesign/cli/authoring'; const x: SingleComponentDoc = {deprecated: …}
+ cli ./doc · Types · interface ComponentBaseDoc deprecated?: ComponentDeprecation import type {ComponentBaseDoc} from '@astryxdesign/cli/doc'; const x: ComponentBaseDoc = {deprecated: …}
+ cli ./doc · Types · interface SubComponentDoc deprecated?: ComponentDeprecation import type {SubComponentDoc} from '@astryxdesign/cli/doc'; const x: SubComponentDoc = {deprecated: …}
+ cli ./doc · Also exported from an earlier entry point · ComponentDeprecation ComponentDeprecation (./authoring) import {ComponentDeprecation} from '@astryxdesign/cli/doc'
+ cli ./template · Also exported from an earlier entry point · ComponentDeprecation ComponentDeprecation (./authoring) import {ComponentDeprecation} from '@astryxdesign/cli/template'
~ cli ./api · Functions · function search function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "hook" | "theme" | "doc" | undefined; limit?: number | undefined }) => Promise<SearchResponse> → function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "doc" | "theme" | "hook" | undefined; limit?: number | undefined }) => Promise<SearchResponse> import {search} from '@astryxdesign/cli/api'; search(…)
+ core . · Components · component DateInput prop calendar?: CalendarSystem = the InternationalizationProvider's calendar, else `'gregory'` <DateInput calendar="s calendar, else `" />
+ core . · Components · component DateRangeInput prop calendar?: CalendarSystem = the InternationalizationProvider's calendar, else `'gregory'` <DateRangeInput calendar="s calendar, else `" />
+ core . · Components · component DateTimeInput prop calendar?: CalendarSystem = the InternationalizationProvider's calendar, else `'gregory'` <DateTimeInput calendar="s calendar, else `" />

Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@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.

Changes requested for the stack: two release texts still say the date inputs stay Gregorian, and #9643 writes its typed-entry logic twice until #9837 lands. #9842's own change is approved.

#9643: changes requested

  • Miss: packages/cli/assets/docs/tree/calendars.doc.mjs line 43 still tells builders that DateInput and DateTimeInput "stay Gregorian", which this pull request makes false, so say they show the chosen calendar.
  • Miss: .changeset/calendar-systems-formatters.md still says "The editor a PowerSearch date value opens still shows Gregorian dates", but the date editor now follows the provider calendar, so narrow that sentence to the date_range editor.
  • DateTimeInput.tsx (lines 788-813 and 1111-1195) repeats DateInput's new pending-text, rejection, status and commit logic beside useTypedDate, as the earlier review of this pull request noted, so move #9837's useTypedDateField extraction into this pull request, or below it, so each field calls one hook.

#10031: approved.

#9794: approved. The release-note fix requested earlier is now made in #9643 and #10031.

#9653: changes requested

  • Regression: the same calendars.doc.mjs line 43 still says DateRangeInput stays Gregorian, the opposite of what this pull request ships, so name it among the inputs that show the chosen calendar.
  • Miss: delete the .changeset/calendar-systems-formatters.md sentence about PowerSearch's Gregorian editor, because this pull request makes every PowerSearch date editor follow the provider calendar.

#9837: approved.

#9842: approved. The typed-text rule matches the owner-approved component:DateInput FR12 and component:DateTimeInput FR13.

Whole stack: changes requested until the two release texts are fixed. A pull request lands only when it and every pull request below it are approved.

[Automated review]

@nynexman4464
nynexman4464 force-pushed the nynexman4464/fix/datetime-disabled-drops-draft branch from ec8a80c to 6f39083 Compare November 5, 2026 04:33
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec 6f39083

A disabled or busy field never takes typed input. DateInput already dropped
text typed before the field became disabled or busy when Enter or blur
committed it; DateTimeInput ran the normal commit instead, so rejected text
stayed in the field with its error. useTypedDateField now always drops the
typed text on such a commit and keeps the value, so both fields behave the
same, and the dropsDraftWhenDisabled option is gone.
A disabled or busy field now ignores Enter and blur. The typed text stays,
with no onChange, no reset, and no typed rejection while the field is locked.
A rejection shown before the lock is hidden and shows again once the field
is editable. The next Enter or blur then commits or rejects as usual, and a
new value still replaces the text. DateInput used to drop the text and
DateTimeInput used to reject it; both fields now behave the same, and the
dropsDraftWhenDisabled option is gone.
…reported date

A date that typing already reported through onChange was committed, so
once a disabled or busy field is editable again it shows its resulting
value, whether or not the change took it, and a retyped date reports
again. Text that never reported still stays until the next Enter or blur
once editable.
…until Enter or blur

When the lock ends while the field has focus, reported text stays under the caret and gives way to the field's value on the next Enter or blur. When the lock ends without focus, the text gives way at once.
…save fails

The date segment passes its committed date to the typed-date hook, as
DateInput does, so the revert of a failed changeAction save does not replace
the text the person is still typing.
@nynexman4464
nynexman4464 force-pushed the nynexman4464/fix/datetime-disabled-drops-draft branch from 6f39083 to 979bee4 Compare November 5, 2026 04:42
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec 979bee4

@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 finished on this head yet.

#9643

Approve. No blocking findings. The calendars guide, the formatter release note and the duplicated typed-entry logic raised in the last review are fixed.

#9842

Approve. No blocking findings.

Whole stack

Passes. A pull request lands only when it and every pull request below it are approved, so #9842 lands with #9643 once required CI passes.

  • Non-blocking: the bottom sheet's year wheel labels about 100 years when it opens, and in the Chinese and Dangi calendars each label is Temporal arithmetic (MonthYearWheels.tsx).

[Automated review]

@nynexman4464
nynexman4464 merged commit 189a730 into main Nov 5, 2026
66 checks passed
github-actions Bot added a commit that referenced this pull request Nov 5, 2026
cixzhang pushed a commit that referenced this pull request Nov 5, 2026
Main's DateInput, DateTimeInput and DateRangeInput calendar change
(#9643, #9842) re-padded DateInput.spec.md's tables. FR14's
requirement row is the only conflict. The merge keeps main's new
column width and this branch's FR14 text, byte for byte.
@github-actions
github-actions Bot deleted the nynexman4464/fix/datetime-disabled-drops-draft branch November 5, 2026 06:03
cixzhang added a commit that referenced this pull request Nov 5, 2026
…eturns (#9915)

* docs(AST-094, AST-057): motion guidance; gesture springs; swipe-row returns

* docs(AST-094): springs where release velocity matters; a measured curve for geometry-keyed gesture motion

* docs(AST-094): tap-, key- and program-started motion picks the duration step by its documented role

* docs(AST-094): tap-started motion plays the token nearest its platform measurement in the Storybook theme

* docs(AST-094): FR45's step rule, FR4's measured spring and the curve arm

FR45's token-picking sentence now covers only tap-, key- and
program-started motion whose record names no duration step. A
tap-started exit keeps `--duration-exit` and `--ease-exit` (FR7), and
ProgressBar FR4's fill keeps `--duration-medium`.

FR4's exception lists a measured gesture spring without a named role in
its component's motion table with its platform source. FR4's role row
admits that spring, and the pager's measured settle reads as covered by
the exception; the program's animated scroll stays the pager's gap.

FR45's browser row, DEC-26's opening and Lightbox FR5 state the curve
arm: a release that carries the gesture's velocity springs, and a settle
keyed by geometry, such as zoom ratio, may play a measured curve that
cites its measurement.

* docs(AST-094): motion follows a component's main interaction; companions keep its pace; springs pair with timing tiers

* docs(AST-094, AST-057): a gesture component's tap-started close plays its spring; the wheel turn plays springs.settle

* Merge remote-tracking branch 'refs/remotes/origin/main' into docs/motion-guidance-gesture-springs

* docs(AST-094): the layout glide plays curve tokens; Switch and SegmentedControl are gesture-capable

* docs(AST-094, components): align Switch, SegmentedControl, ContextMenu, Slider, Lightbox, DateInput and AST-057 to the main-interaction rule

* docs(AST-094, Switch): the thumb lift plays switchControl.lift; FR4's exception covers only a gesture-driven exit

* docs(AST-090, AST-094, components): exit timing scoped to tap components; Slider, Switch and Lightbox wording follows the main-interaction rule

* Merge main into the branch

Main's DateInput, DateTimeInput and DateRangeInput calendar change
(#9643, #9842) re-padded DateInput.spec.md's tables. FR14's
requirement row is the only conflict. The merge keeps main's new
column width and this branch's FR14 text, byte for byte.

* docs(AST-094, AST-090, Switch, SegmentedControl): the gesture-capable spring applies under touch; a mouse click or a key keeps the theme's curve

* docs(Switch, SegmentedControl, AST-094): under touch every input settles on the spring; without touch the theme's curve, as released

* docs(AST-094, AST-090, Switch): restore one line per Current-state impact entry; Switch's well springs play for every touch change

* Merge main into docs/motion-guidance-gesture-springs

Co-authored-by: Christopher Chedeau <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — 979bee4e 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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant