谁知道如何更改下图中的格式
我的AppDateAdapter:
export class AppDateAdapter extends NativeDateAdapter {
// tslint:disable-next-line:no-any
format(date: Date, displayFormat: any): string {
if (displayFormat === 'input') {
let day: string = date.getDate().toString();
day = +day < 10 ? '0' + day : day;
let month: string = (date.getMonth() + 1).toString();
month = +month < 10 ? '0' + month : month;
const year = date.getFullYear();
return `${day}.${month}.${year}`;
}
return date.toDateString();
}
getFirstDayOfWeek(): number {
return 1;
}
}