我正在使用mydate picker https://www.npmjs.com/package/angular4-datepicker 我正在尝试从日历中选择日期,并将所选日期作为请求发送给服务。但是日期将作为[object Object],我收到响应错误为Bad request。
<my-date-picker name="outOldestDate" class="form-control required" [options]="myDatePickerOptions" formControlName="outOldestDate"></my-date-picker>
public myDatePickerOptions: IMyDpOptions = {
dateFormat: 'yyyy-mm-dd',
}
ngOnInit() {
this.myForm = this.formBuilder.group({
outOldestDate: [null, Validators.required]
});