simple jQuery example

simple jQuery example

Hi,
having difficulty getting my head around the syntax for jQuery. The documentation is extnsive but not very clrear cut, as a initial simple example I just want to format the date returned from a from datepicker textbox
so i have
<html>
<head>
<script type="text/javascript">
    $(function() {
        $("#datepicker").datepicker();
    });
    </script>
</head>
<body>
<input id="datepicker" type="text">
</body>
</html>

the only documentation on the formatDate utilityis this
$.datepicker.formatDate('yy-mm-dd', new Date(2007, 1 - 1, 26));

So the question is, how do i use this to format the date picked
by the user in the datepicker popup screen?

i know it should be obvious but its not!