bug(material/datepicker): Re-evaluate how the MatDatepicker handles timezones
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la documentation de MatDatepicker et MatMomentDateModule, puis examinez l’issue #7167 associée pour prendre connaissance des discussions existantes sur les fuseaux horaires. Documentez une méthode claire et prise en charge pour obtenir des dates indépendantes du fuseau horaire ou des dates UTC, y compris le comportement attendu pour les valeurs moment ; l’issue est terminée lorsque les utilisateurs peuvent suivre les indications sans dépendre de commentaires dispersés dans l’issue.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- documentation, frontend
- Type d'issue
- Documentation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100