feat(datepicker): use invalid date instead of null when the date input it not empty
未关闭
area: material/datepicker
feature
P3
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
### Feature Description
Set the value to invalid date instead of null, when the input is filled, but invalid. As this would be a breaking change, maybe introduce a setting to optionally enable this.
### Use Case
Currently when you use a datepicker without ngModel or reactive forms the input wont get red for invalid inputs and the value is null. So you cant differenciate between empty input and something invalid. Even aria-invalid is "false".
With this feature you could solve this.
贡献指南
调研方向
首先定位 datepicker 的实现,以及它对已填写但无效输入的处理方式。检查空值和无效值目前有何不同,包括 aria-invalid 的行为,并在决定 opt-in 设置应如何工作之前,找出现有的 datepicker 测试。完成标准是:在不意外改变默认行为的情况下,可以将无效的非空输入与空输入区分开来。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100