Local.setItem/ local.getItem pass a wrong date type

Source page:
let paramdate = rowData.valueDate
local.setItem(“taarich”, paramdate)
console.log(’ kabalot paypal paramdate====>', paramdate )

The date parameter passed to the other page looks fine as shown in the below console.log kabalot paypal paramdate====> 2019-06-16T21:00:00.000Z

Target page
In the target page it says it’s not a valid type date

$w(“#datePicker1”).value = local.getItem(“taarich”)

SDK error: The value parameter that is passed to the value method cannot be set to the value 2019-06-16T21:00:00.000Z. It must be of type date.

When you set an item to the storage, it’s automatically converted into string.
So after you get it on the other page, you should convert it to a date type again.
Try:

 $w("#datePicker1").value =  new Date(local.getItem("taarich"));

and let us know if it worked.

Thank’s a lot. I wiil try.

Thanks, it works perfectly.

You’re welcome