DatePicker popup TimeField collapses when rendered inside Form

オープン
#10,899 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Sufiyan-MSA がすでに取り組んでいます。

2026年11月1日 から。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
css, react, typescript
領域
design, frontend

調査の方向性

The bug sits where Spectrum's DatePicker popup TimeField picks up React Aria's FormContext and applies grid-template-columns: subgrid. Start by reproducing with the StackBlitz linked in the issue, then check the computed grid styles on the popup's parent flex container. Done means the time input keeps its full width inside a Form with no change in behaviour outside one.

索引モデルが issue の本文から書いたものです。

説明

Provide a general summary of the issue here

When a time-enabled Spectrum 2 DatePicker is rendered inside Spectrum’s Form, the time input in its calendar popup collapses, clipping the time segments.

The same picker renders its popup time input correctly outside Form.

Image
🤔 Expected Behavior?

The popup’s time input should remain wide enough to display and edit all time segments, regardless of whether the DatePicker is inside a Form.

😯 Current Behavior

The time input shrinks and is not wide enough to interact with properly.

💁 Possible Solution

The popup TimeField appears to inherit React Aria’s FormContext. Spectrum uses the presence of this context to enable grid-template-columns: subgrid.

However, the popup TimeField’s immediate parent is a flex container rather than the Form’s grid. Its computed grid-template-columns is none, and the input collapses to its minimum width.

🔦 Context

This affects a form containing date pickers. The date fields themselves fill the form correctly, but the time inputs are clipped and difficult to use.

🖥️ Steps to Reproduce

https://stackblitz.com/edit/yn2buesf?file=src%2FExample.tsx

  1. Open the page
  2. Open the calendar popup and observe that the Time input is collapsed
  3. Close the popup and replace the surrounding <Form> with <div>, leaving the picker unchanged
  4. Open the popup again. The Time input renders at its normal width
Version

@react-spectrum/s2 1.8.2

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

macOS

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

主要言語
TypeScript
スター
16k
フォーク
1.6k
平均マージ
2日 19時間
マージ済み PR(30日)
41

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

adobe/react-spectrum のほかの issue

adobe/react-spectrum の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。