Help me please!

Hi, I am new to js and web programming.

Was trying to use a datepicker in the link below:

After getting the widgetcalendar to show on the webpage, I tried ways to return the selected dates but couldn’t get it to work =(
I want to onSubmit return the dates but it just doesn’t work…

The code mention to use:
$(‘input’).DatePickerGetDate(formated); //set formated

But how to use it and put where? Please help…
Appreciate if can show how to write the code. Thanks!