我有来自Angular Material
的HTML> <mat-form-field class="start-date-full-width"> <input matInput
> [matDatepicker]="picker" placeholder="Start Date">
> <mat-datepicker-toggle matSuffix
> [for]="picker"></mat-datepicker-toggle> <mat-datepicker
> touchUi="true" #picker></mat-datepicker> </mat-form-field>
当我选择实际日期时,我需要将提供给我的数据设置为 dispStartTs heres the data I'm talking about
到我的TS文件。
这是我到目前为止的代码:
onUpdatePingIt() {
let dispMsg = this.pingItMessageForMessageCenter + ' ' + this.pingItMessage;
let dispStartTs = this.startDatePicker;
let dispEndTs = '';
let userId = ;
this.apiEndPointService.onUpdatePingItMessageBoard(dispMsg, dispStartTs, dispEndTs, userId).subscribe(response => {
console.log(response)
});
}
我该怎么做呢?任何帮助将不胜感激。 我假设我需要制作一个单独的TS文件,甚至可能需要一个服务并手动选择它,然后重新使用该组件。但我可能是错的。请帮忙。