ive set the locale of the date to be en-GB - so that the datepicker can be in the UK format.
If i enter a date manually 10/12/2018
(10th December 2018) and hit tab the date gets converted to 12/10/2018
(12th October 2018) .
Selecting the original date using the picker works fine this problem only occurs when typing it in manually and when specifying a locale.
https://stackblitz.com/edit/angular-hv6jny
<mat-form-field>
<input matInput [matDatepicker]="picker" placeholder="Choose a date">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
--
providers: [
{ provide: MAT_DATE_LOCALE, useValue: 'en-GB' },
]
Is this a bug with the datepicker?