bug(material/datepicker): Re-evaluate how the MatDatepicker handles timezones
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
#### 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dalla documentazione di MatDatepicker e MatMomentDateModule, quindi esamina la issue #7167 correlata per individuare le discussioni esistenti sui fusi orari. Documenta un modo chiaro e supportato per ottenere date indipendenti dal fuso orario o date UTC, incluso il comportamento previsto per i valori moment; la issue è completata quando gli utenti possono seguire le indicazioni senza dover fare affidamento su commenti sparsi nella issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- documentation, frontend
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100