DatePicker popup TimeField collapses when rendered inside Form
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- css, react, typescript
调研方向
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.
🤔 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
- Open the page
- Open the calendar popup and observe that the Time input is collapsed
- Close the popup and replace the surrounding
<Form>with<div>, leaving the picker unchanged - 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
- 平均合并
- 3 天 19 小时
- 30 天内合并 PR
- 46
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
adobe/react-spectrum 的其他 Issue
-
PreviewTrigger: the preview dialog has no accessible name可能已有人在做 @therealemmanueloppong 今天认领。 未关闭accessibility bug PreviewTrigger
难度 2/5 1-3 小时 新手友好度 76/100
adobe/react-spectrum#10917 · 3 条评论 ·
维护者通常 1 天内回复
-
S2 quiet Picker menu is always 192px wide: its width calc() has no unit可能已有人在做 @darshpatel1052 于 3 天前认领。 未关闭waiting on author
难度 2/5 1 小时以内 新手友好度 88/100
adobe/react-spectrum#10909 · 3 条评论 ·
维护者通常 1 天内回复
-
DatePicker omits timezone for initially empty fields despite zoned placeholderValue可能已有人在做 @mrlexcoder 于 3 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 68/100
adobe/react-spectrum#10900 · 2 条评论 ·
维护者通常 1 天内回复
-
Separator adds a redundant role="separator" to its default <hr>可能已有人在做 @Janani-bn 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
adobe/react-spectrum#10894 · 2 条评论 ·
维护者通常 1 天内回复
-
ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is open可能已有人在做 @mangeshraut712 于 10 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
adobe/react-spectrum#10866 ·
维护者通常 1 天内回复
查看 adobe/react-spectrum 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
"Claude Code request is missing its initial user message" when the prompt starts with an image path未关闭
难度 2/5 1-3 小时 新手友好度 84/100
earendil-works/pi-claude-code#31 ·
维护者通常 8 天内回复
-
bug pending triage
难度 1/5 1 小时以内 新手友好度 92/100
privatenumber/cleye#48 ·
-
Google text documents are base64-encoded twice可能已有人在做 @feiiiiii5 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复