Why is currentdate in this.currentdate.getTime() coming back as undefined?
newlisting = this.formBuilder.group({
    availabledate: new FormGroup({
      xyz: new FormControl()
    },[this.mainservice.getcurrenttime.bind(this)])
})
@Injectable({providedIn: 'root'})
export class MainService {
  constructor(){}
 
  currentdate: Date = new Date();
  getcurrenttime(control: FormGroup){
    console.log(this.currentdate.getTime())  <~~ Generates Error!!!
    if(condition){
      return {date: true};
    }
    return null;
  }
}
 
     
    