patternfly / patternfly/patternfly-react
DatePicker: specify time zone for today's date (current)
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 862
- 派生
- 392
- 平均合并
- 4 天 8 小时
- 30 天内合并 PR
- 9
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx 中硬编码的今天日期附近开始,然后跟踪 DatePicker 和 CalendarMonth 如何确定当前日期。根据 issue 中的 UTC 示例定义时区属性的行为,并验证今天日期的高亮遵循所选时区,而不是计算机的本地设置。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react, typescript
- 领域
- frontend
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100