h2qutc / angular-material-components

Angular Material Library provide extra components for every project
https://h2qutc.github.io/angular-material-components/
MIT License
331 stars 162 forks source link

setHours is not a function #267

Open thavus opened 2 years ago

thavus commented 2 years ago

image It works but it outputs tons of console errors about setHours is not a function

Probably you forgot to convert something to a Date object.

component.html:

<ngx-mat-timepicker #picker formControlName="scheduleTimeFormControl" [enableMeridian]="true">
                    </ngx-mat-timepicker>

component.ts

  ngOnInit(): void {
    this.setupForm();
  }

  setupForm(): void {
    this.schedulingFormGroup = new FormGroup({
      daySelectFormControl: new FormControl('', [Validators.required]),
      scheduleTimeFormControl: new FormControl('', [Validators.required])
    });
  }
h2qutc commented 2 years ago

@thavus Can you let me know which version you used please ?