valid dd/mm format switch sides after manual input on datepicker field
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Bug, feature request, or proposal:
Bug
#### What is the expected behavior?
That the valid `dd/mm/yyyy` inputed date remains as it is, not matter what, they always switch sides on change.
#### What is the current behavior?
E.g.: `03/02/1990` becomes `02/03/1990`.
#### What are the steps to reproduce?
Set a custom locale like Brasil:
```typescript
// location
import localePt from '@angular/common/locales/pt';
import localePtExtra from '@angular/common/locales/extra/pt';
registerLocaleData(localePt, 'pt', localePtExtra);
```
Then try to use the datepicker with manual input.
#### What is the use-case or motivation for changing an existing behavior?
Because it works very well with the Angular locale config, there's just this switch bug that does not work properly.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
```json
{
"@angular/core": "^6.0.6",
"@angular/material": "^6.3.0",
}
```
#### Is there anything else we should know?
##### UI input:

##### Manual input:

~I really don't wanna use moment.js~
----
It seems like the StackBlitz example isn't wroking as well: https://stackblitz.com/angular/vnvbdjykmve?file=app%2Fdatepicker-locale-example.ts
コントリビューションガイド
調査の方向性
app/datepicker-locale-example.ts にあるリンク先の StackBlitz 例から始め、pt ロケールと追加のロケールデータを登録した後の datepicker の手動入力動作を再現します。datepicker のロケール対応パースと変更処理を追跡します。03/02/1990 のように入力した値がフィールドの変更後も同じままであれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend, internationalization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100