DatePicker omits timezone for initially empty fields despite zoned placeholderValue
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Đoạn mã liên quan là placeholderValue trong DatePicker.tsx: nó được tách từ props nhưng không được truyền vào AriaDatePicker, và chỉ đến được TimeField của popover. Hãy bắt đầu bằng việc đọc cách component xây dựng props, sau đó chạy bản tái hiện StackBlitz được liên kết để xác nhận giá trị được gửi đi không có múi giờ. Hoàn thành khi một DatePicker rỗng với placeholderValue có múi giờ gửi đi một giá trị bao gồm múi giờ UTC và các test DatePicker hiện có vẫn pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Provide a general summary of the issue here
An initially empty DatePicker with placeholderValue={now("UTC")} produces a date-time without a timezone after selecting a date.
🤔 Expected Behavior?
The selected value should inherit the UTC timezone from placeholderValue.
😯 Current Behavior
Selecting 2 November 2026 and submitting the form sends 2026-11-02T00:00:00. The value contains neither a timezone identifier nor an offset.
💁 Possible Solution
DatePicker.tsx destructures placeholderValue out of its props but does not forward it to <AriaDatePicker>. It only passes it to the popover’s TimeField.
🔦 Context
This affects a form containing date pickers. The backend expects zoned date-times for all submissions, so it rejects the submitted values.
🖥️ Steps to Reproduce
https://stackblitz.com/edit/e6rtt68y?file=src%2FExample.tsx
- Open the page
- Open the calendar popup and select a date
- Submit the form
- Observe the submitted value
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
- Ngôn ngữ chính
- TypeScript
- Star
- 16k
- Fork
- 1.6k
- Merge trung bình
- 3 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 45
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của adobe/react-spectrum
-
accessibility bug PreviewTrigger
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
adobe/react-spectrum#10917 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
S2 quiet Picker menu is always 192px wide: its width calc() has no unitCó thể đã có người làm @darshpatel1052 đã nhận 2 ngày trước. Đang mởwaiting on author
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 88/100
adobe/react-spectrum#10909 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Separator adds a redundant role="separator" to its default <hr>Có thể đã có người làm @Janani-bn đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
adobe/react-spectrum#10894 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is openCó thể đã có người làm @mangeshraut712 đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
adobe/react-spectrum#10866 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CheckboxGroup: `validationBehavior="aria"` is ignored by its checkboxes since 1.18Có thể đã có người làm @mangeshraut712 đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
adobe/react-spectrum#10856 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của adobe/react-spectrum
Issue tương tự
-
Report: &TV InternationalĐang mởcheck:passed streams:remove
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug priority-p1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
beginner blocked
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
hiero-ledger/hiero-sdk-js#4670 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Exploratory] Expense - 2 selected drop-down is shown twice when selecting hold from more option.Đang mởMonthly Not a priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Expensify/App#106080 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày