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
@@ -63,7 +63,7 @@ export class MozimoDailyRegisterComponent implements OnInit {
dataSource: MozimoDailyRegisterDataSource = new MozimoDailyRegisterDataSource(this.body);
form: FormGroup<{
date: FormControl<Date>;
date: FormControl<moment.Moment>;
items: FormArray<
FormGroup<{
received: FormControl<number>;
@@ -80,7 +80,7 @@ export class MozimoDailyRegisterComponent implements OnInit {
constructor() {
this.form = new FormGroup({
date: new FormControl(new Date(), { nonNullable: true }),
date: new FormControl(moment(new Date()), { nonNullable: true }),
items: new FormArray<
FormGroup<{
received: FormControl<number>;
@@ -98,7 +98,7 @@ export class MozimoDailyRegisterComponent implements OnInit {
const data = value as { info: MozimoDailyRegister };
this.info = data.info;
this.form.patchValue({
date: moment(this.info.date, 'DD-MMM-YYYY').toDate(),
date: moment(this.info.date, 'DD-MMM-YYYY'),
});
this.form.controls.items.clear();
this.info.body.forEach((x) =>