valid dd/mm format switch sides after manual input on datepicker field
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
#### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con l'esempio StackBlitz collegato in app/datepicker-locale-example.ts e riproduci il comportamento di input manuale del datepicker dopo aver registrato la locale pt e i dati di locale aggiuntivi. Traccia il parsing consapevole della locale del datepicker e la gestione delle modifiche; il lavoro è completato quando un valore inserito come 03/02/1990 rimane invariato dopo la modifica del campo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend, internationalization
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100