Datepicker return value

when I use the Datepicker control the value returned to the display is exactly what I want however
the value in my variable is different.

ie if I select november 30 2018 in the display I get 20181130 but in my variable I get
Mon Nov 30 2018 00:00:00 GMT-0500 (Eastern Standard Time).

how can I retrieve just the 20181126 ?

Thanks..

What you see is the default string representation of a JavaScript Date object. What do you need to do with the Date? If you want to format it in certain way you can check here.

I was just looking to get the value that field shows in the display. can I access datapicker0 directly ?
i'm still learning the product so thank you for the patience.. I looked at your link but it is still crashing can you give me a hint on how I put this in radzen to get the value to my variable ?

You should data-bind the Value property of the DatePicker to a page property. More info is available in the Page properties article (the example shows a TextBox but it is the same with the DatePicker).

i'm using a range in the dates so that adds to it. of course it is always the worst when you see the value that you need in the field you need it in but have to jump through hoops to use it.

I don't understand what you mean. Could you clarify? What are you trying to achieve with the value of the DatePicker? Display it on the screen? Send it to a database? I have provided all resources available but still do not understand what you are trying to do.

I've added a datapicker to the my page that will return a range of dates. on the page the date picker
shows my data as I had setup in the control for yymmdd which is perfect. where I was falling down was where I had in the value of the control ${mydatepickrange} whose value I send to my webservice.

Don't take my comments above as criticism of the product as i'm still learning on how to use it, but since I saw the selected date value in the format that I specified I thought I would be able to get that value directly.

I think I understand now. The DatePicker value is a instance of the JavaSript Date object (or an array of Dates if multiple selection is enabled). The date you see in the date picker is a custom string representation of that date value. However if you send the dates to a custom web service without doing anything they will be converted to string according to the toString() method specifics.

We can probably introduce a property of the DatePicker which will convert dates to strings automatically when updating a page property.