valid dd/mm format switch sides after manual input on datepicker field
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### 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
Beitragsleitfaden
Rechercherichtung
Beginne mit dem verknüpften StackBlitz-Beispiel unter app/datepicker-locale-example.ts und stelle das Verhalten des datepicker bei manueller Eingabe wieder her, nachdem das pt-Gebietsschema und zusätzliche Gebietsschemadaten registriert wurden. Verfolge das gebietsschemaabhängige Parsing und die Änderungsbehandlung des datepicker; als erledigt gilt dies, wenn ein eingegebener Wert wie 03/02/1990 nach Änderungen des Felds unverändert bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend, internationalization
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100