Date Range Values into local Storage

I can't get Date Range Start and End values into local Storage

The code I am using under the OK button is:

localStorage.setValue ("StartDate", dateRange1.Start date.value);
localStorage.setValue ("EndDate", dateRange1.End date.value);

I am attaching some screen shots to show the error messages.

Any suggestions?

Mike

It should be

localStorage.setValue("startDate",dateRange1.value.start);
localStorage.setValue("endDate",dateRange1.value.end);

Anson:

Yes, it works !!!

Thank you so much.

I will mark this as the Solution.

Mike