I want to format my date with toIsoString function but the function returns -1 day how to fix it? the event.value format is Tue Apr 19 2022 00:00:00 GMT+0400 (Armenia Standard Time)
console.log(new Date(event.value).toISOString().slice(0,10))
in the console, I'm getting this one 2022-04-18 how you can see the result was -1 day
startDateChange(event: any): void{
this.firstDayOfMonth = event;
console.log(new Date(event.value).toISOString().slice(0, 10));
}