Below is the code to get the date range between start and end date but when the array is returned getDate
is not a function error is consoled
checkdate(dt){
let dtdates=new Date(dt);
dtdates.setDate(dt.getDate() + 1);
return dtdates
}
getDates(pstart1,pend2){
console.log(pstart1);
console.log(pend2);
let dt:Date= pstart1
console.log(dt);
while(dt<=pend2){
this.dates.push(dt);
dt=this.checkdate(dt)
console.log(this.dates)
}
return this.dates;
}
Am I missing something here?