I'm trying to pass in a unix timestamp to mat date-picker. But, it's not getting parsed.
This is the custom date format i'm passing to MAT_DATE_FORMATS
export const DATE_FORMATS = {
parse: {
dateInput: 'X',
},
display: {
dateInput: 'DD/MM/YYYY',
monthYearLabel: 'MMM YY',
dateA11yLabel: 'LL',
monthYearA11yLabel: 'MMMM YYYY',
},
};
providers: [
{
provide: DateAdapter,
useClass: MomentDateAdapter,
deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],
},
{ provide: MAT_DATE_FORMATS, useValue: DATE_FORMATS },
]
How to support parsing of unix timestamp with date picker?