bug(material/datepicker): Re-evaluate how the MatDatepicker handles timezones
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Bug, feature request, or proposal:
Documentation request
#### What is the expected behavior?
The moment object returned by selecting a date with Datepicker should have no timezone information (or UTC)
#### What is the current behavior?
Currently the moment object looks like this: Wed Apr 18 2018 00:00:00 GMT+0300
(The user is located in GMT+3, so his timezone is used)
#### What is the use-case or motivation for changing an existing behavior?
I wonder how to make my matDatepicker return UTC dates so that they are independent of the timezone the user is currently in. I've found lots of issues regarding this (https://github.com/angular/material2/issues/7167), but no clear and simple explanation on how to easily achieve that.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.2.0, Angular Material 6.0.0-beta.4, Typescript 2.5.3, ANY browser (not just IE!)
#### Is there anything else we should know?
I'm importing MatMomentDateModule, so all the dates in the app are momentjs dates.
コントリビューションガイド
調査の方向性
MatDatepicker と MatMomentDateModule のドキュメントから始め、関連する issue #7167 を確認して、既存のタイムゾーンに関する議論を調べます。タイムゾーンに依存しない日付または UTC の日付を取得するための、明確でサポートされている方法を、moment の値に対して期待される動作も含めて文書化します。ユーザーが issue の散在したコメントに頼らずにその説明に従えるようになった時点で、issue は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- documentation, frontend
- issue の種類
- ドキュメント
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100