我正在使用ng-bootstrap的ngbDate
对象。我想将它转换为标准的Date
对象。你该如何做到这一点?
以下是相关的.ts
文件部分:
import {NgbCalendar, NgbDate} from "@ng-bootstrap/ng-bootstrap";
fromDate: NgbDate;
toDate: NgbDate;
constructor(calendar: NgbCalendar) {
this.fromDate = calendar.getToday();
this.toDate = calendar.getNext(calendar.getToday(), 'd', 10);
}