1
I just upgraded my Angular 5 application to Angular 6.
When saving a record in the Firebase database using mat-datepicker checking in the database I noticed that is correctly saving the date with type timestamp.
birth date: (12 July 2018 00:00:00 UTC-3).
When listing the records I can’t use the Angular Pipedate because there is an error, because it is returning from the database (Timestamp(Conds=1531.. in the data_birth column on mat-table;
Before I made this update to Angular 6, I was simply saving the object Date() that the mat-datepicker created and in the mat-table could do {{ date | date }} normally.
In my app.modulets.: I’m defining the LOCALE_ID;
import { registerLocaleData } from '@angular/common';
import localePt from '@angular/common/locales/pt';
registerLocaleData(localePt);
providers: [
{ provide: LOCALE_ID, useValue: 'pt-BR' },
]
I have tried to remove LOCALE_ID leaving the pattern, but it is still not working properly, when returning the object Date() that the mat-date-Picker creates in the bank, the date in the input or in the mat-table;
I don’t know if this is some change from Firebase or Angular, I don’t know what to do because I’m not getting to show the birth date in the mat-table nor in the form.