我是 Angular 的新手,我想为我的日期选择器格式化我的输入值,但我不知道怎么做。我想做这样的事情:
<mat-date-range-input [rangePicker]="picker">
<input
class="hide"
matStartDate
[value]="startDate | date: 'shortDate': '' "
#dateRangeStart
placeholder="Start date"
/>
<input
class="hide"
matEndDate
[value]="endDate | date: 'shortDate': '' "
placeholder="End date"
[max]="today"
#dateRangeEnd
(dateChange)="dateRangeChange(dateRangeStart, dateRangeEnd)"
/>
/>