bug(DatePicker): Typing a date in "YYYY-MM-DD" format will format the date to "M/D/YYYY" but a day behind
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
Typing a date in "YYYY-MM-DD" format will format the date to "M/D/YYYY" but a day behind. This occurs using the control in various modes, including the date range picker.
### Reproduction
Steps to reproduce (can use demo on documentation page):
1. Render date picker with default formatting.
2. Type in the value "2023-07-06"
3. Lose focus of the input field.
4. The date picker changes the value to: "7/5/2023"
### Expected Behavior
I expect to see the date represented in a different format with the same date value.
Value entered: 2023-07-06
Expected result: 7/6/2023
### Actual Behavior
The date in the proper format, but one day behind.
Value entered: 2023-07-06
Actual result: 7/5/2023
### Environment
This bug occurs on the demo page for angular material:
https://material.angular.io/components/datepicker/overview
- Angular: v14+
- CDK/Material: v14+ (probably earlier)
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
コントリビューションガイド
調査の方向性
material.angular.io の Angular Material datepicker デモから始め、デフォルトモードと日付範囲モードで YYYY-MM-DD 入力がフォーカスを失う現象を再現してください。次に、datepicker の入力の解析およびフォーマット処理の経路を追跡し、基になる日付の値を変更せずに、2023-07-06 が 7/5/2023 ではなく 7/6/2023 と表示されることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 58/100