Converted Date to Moment. Since Datepicker is already using Moment adapter

This commit is contained in:
2025-07-15 19:04:35 +00:00
parent d3588977a5
commit c542114e42
25 changed files with 126 additions and 126 deletions
@@ -44,8 +44,8 @@ export class NetTransactionsComponent implements OnInit {
info: NetTransactions = new NetTransactions();
dataSource: NetTransactionsDataSource = new NetTransactionsDataSource(this.info.body, this.paginator, this.sort);
form: FormGroup<{
startDate: FormControl<Date>;
finishDate: FormControl<Date>;
startDate: FormControl<moment.Moment>;
finishDate: FormControl<moment.Moment>;
}>;
selectedRowId = '';
@@ -61,8 +61,8 @@ export class NetTransactionsComponent implements OnInit {
constructor() {
this.form = new FormGroup({
startDate: new FormControl(new Date(), { nonNullable: true }),
finishDate: new FormControl(new Date(), { nonNullable: true }),
startDate: new FormControl(moment(new Date()), { nonNullable: true }),
finishDate: new FormControl(moment(new Date()), { nonNullable: true }),
});
}
@@ -72,8 +72,8 @@ export class NetTransactionsComponent implements OnInit {
this.info = data.info;
this.form.setValue({
startDate: moment(this.info.startDate, 'DD-MMM-YYYY').toDate(),
finishDate: moment(this.info.finishDate, 'DD-MMM-YYYY').toDate(),
startDate: moment(this.info.startDate, 'DD-MMM-YYYY'),
finishDate: moment(this.info.finishDate, 'DD-MMM-YYYY'),
});
this.dataSource = new NetTransactionsDataSource(this.info.body, this.paginator, this.sort);
});