feat(MatDateRangePicker): dateFilter for start and end dates independently.
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
Feature Description
We have the dateFilter input, but this is limited to forcing you to use the same filter for the start range and end range. I'd like to see startDateFilter and endDateFilter inputs so that I can provide a filter for the start of the range and the end of the range independently. It doesn't have to be this exact solution, so as long as the use-case below can be met.
I think that the endDateFilter should also have an argument for the "start date" that the user selected so that you can programmatically define which end date(s) are acceptable for the start date the user selected if that is a necessary constraint.
Use Case
Our use-case is to require the user to select a date that falls on any Monday then require the user to select any date after Monday so as long as it falls on a Sunday.
I don't see any way to require the user to do this without form validation rules (I'd like this to facilitated by the UI instead of through validation error messages).
The only thing that comes close, is the SelectionStrategy functionality, but it doesn't seem suitable for a variable number of weeks.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查 MatDateRangePicker 的 dateFilter 输入和现有的 SelectionStrategy 功能。检查当前 API 如何处理开始日期和结束日期,然后确定此用例是否可以支持分别选择星期一作为开始日期、星期日作为结束日期,同时使所选开始日期可用于结束日期筛选。完成标准是 UI 能够强制执行所述约束,而不依赖表单验证错误消息。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100