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,7 +44,7 @@ export class TrialBalanceComponent implements OnInit {
info: TrialBalance = new TrialBalance();
dataSource: TrialBalanceDataSource = new TrialBalanceDataSource(this.info.body, this.paginator, this.sort);
form: FormGroup<{
date: FormControl<Date>;
date: FormControl<moment.Moment>;
}>;
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
@@ -59,7 +59,7 @@ export class TrialBalanceComponent implements OnInit {
constructor() {
this.form = new FormGroup({
date: new FormControl(new Date(), { nonNullable: true }),
date: new FormControl(moment(new Date()), { nonNullable: true }),
});
}
@@ -69,7 +69,7 @@ export class TrialBalanceComponent implements OnInit {
this.info = data.info;
this.form.setValue({
date: moment(this.info.date, 'DD-MMM-YYYY').toDate(),
date: moment(this.info.date, 'DD-MMM-YYYY'),
});
this.dataSource = new TrialBalanceDataSource(this.info.body, this.paginator, this.sort);
});