Convert a string to date and use it as default value for date picker

Hi,
I have a date picker for which the value should bne feed from the value of the datepicker of another side. Saving the value and using it on another page is not an issue, however I am struggling with the format as it is a string and not an object.

My code is here:

// getting the value from another page of the website
let myDate = session.getItem("mySelectedDate");
console.log(myDate) //Returns: Wed Apr 22 2020 00:00:00 GMT+0200 (Mitteleuropäische Sommerzeit) -> German Version for CET
console.log(typeof myDate) //type is string 

$w("#datePicker1").value = myDate ; // this piece is not working, it requires an object and not a string as input

I tried Date.parse, but this only gives me a number and not an object which is required. I also tried new date () but this is not working, the error message says that this command does not exist. Any idea how I can change the string?

Same problem here if you got solution help me please

$w ( " #datePicker1 " ). value = new Date(myDate)