angular / angular/components

feat(input): add (limited) support for text masking

未关闭
#7,645 16 条评论 11 个 reaction 已指派 0 人 在 GitHub 查看
area: material/input feature P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### Bug, feature request, or proposal:
How can I set a text mask in date picker component so, if user doesn't want to select a date in calendar, he can type and fill correctly the field?

#### What is the expected behavior?
When click on input date picker, show the mask so user can type date instead of selecting a date from calendar

#### What is the current behavior?
empty input

#### What are the steps to reproduce?
Providing a StackBlitz/Plunker (or similar) is the *best* way to get the team to see your issue.

Plunker starter (using on `@master`): https://goo.gl/DlHd6U

StackBlitz starter (using latest `npm` release): https://goo.gl/wwnhMV

Just add a datepicker component

#### What is the use-case or motivation for changing an existing behavior?
Maybe user wants to type date instead of selecting form calendar.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
@angular/cli: 1.3.0
node: 6.10.3
os: darwin x64
@angular/animations: 4.3.5
@angular/cdk: 2.0.0-beta.8
@angular/common: 4.3.5
@angular/compiler: 4.3.5
@angular/core: 4.3.5
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 4.3.5
@angular/http: 4.3.5
@angular/material: 2.0.0-beta.8
@angular/platform-browser: 4.3.5
@angular/platform-browser-dynamic: 4.3.5
@angular/router: 4.3.5
@angular/cli: 1.3.0
@angular/compiler-cli: 4.3.5
@angular/language-service: 4.3.5

#### Is there anything else we should know?

贡献指南

打开贡献指南

调研方向

首先使用链接的 StackBlitz 或 Plunker 示例,通过 date picker 组件复现该请求。检查 date picker 的输入行为,并确定预期的输入、掩码、解析和日历交互方式;完成的标准是用户可以输入格式正确的日期,而无需从日历中选择该日期。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。