angular-material-components icon indicating copy to clipboard operation
angular-material-components copied to clipboard

setHours is not a function

Open thavus opened this issue 3 years ago • 1 comments

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])
    });
  }

thavus avatar May 20 '22 03:05 thavus

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

h2qutc avatar Jun 07 '22 22:06 h2qutc