patternfly / patternfly/patternfly-react
DatePicker: specify time zone for today's date (current)
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 862
- Fork
- 392
- Merge trung bình
- 4 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 9
Mô tả
Describe the enhancement or change
We propose adding a property to the DatePicker (and CalendarMonth) components to specify the time zone to be applied when determining today's date.
Details
In our application, users can specify the time zone they are working in.
For instance, a user located in the PST time zone may collaborate with users in the UK and choose to use the UTC time zone within the application.
If the user sets the time zone to UTC (01:02, 21 November), the application may still highlight the 20th because it reflects the local date based on the user's computer settings rather than the selected UTC time zone (17:02, 20 November).
When the user changes their computer’s clock to UTC, then the today's date is updated to the 21st as expected.
Is this request originating from a Red Hat product team? If so, which ones and is there any sort of deadline for this enhancement?
No
Any other information?
Link to hardcoded today's date: https://github.com/patternfly/patternfly-react/blob/main/packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx#L122
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.
Hướng nghiên cứu
Bắt đầu tại packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx, gần ngày hôm nay được hardcode, sau đó lần theo cách DatePicker và CalendarMonth xác định ngày hiện tại. Xác định hành vi của thuộc tính múi giờ dựa trên ví dụ UTC trong issue và xác minh rằng việc đánh dấu ngày hôm nay tuân theo múi giờ được chọn thay vì cài đặt cục bộ của máy tính.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100