Please help! Newbie Question

Hi all, I am new to JS and all web programming.
Have been trying to get a datepicker to work but I don’t know how to return the selected dates… =(

My HTML:

		<form action="<?php echo $_SERVER['PHP_SELF']; ?>"
		method=GET>
		<div id="widgetCalendar">		
		</div>
                    </form>

datepicker.js:
getDate: function(formated) {
if (this.size() > 0) {
return prepareDate($(‘#’ + $(this).data(‘datepickerId’)).data(‘datepicker’))[formated ? 0 : 1];
}
},

I have choosen the dates, how do I get it to return the dates selected after clicking on the submit button?
The website tell me to use:
$(‘input’).DatePickerGetDate(formated);
Set ‘formated’ to true.

But where should I put this and how to put this in my html?
Appreciate if can show me and explain with a code please. Thanks for your help!

Which datepicker are you using?
Could you provide a link to the project’s homepage?