Q:

Submit datepicker value concatenate with another input save in one input name

I am doing a web site for a restaurant, and my reservation form submits to 'open table'. In order to submit the good url I need to concatenate a Datepicker value (jquery plugin) with the time value of another form.
Open table needs that to get inside the name input "d". 
Something like this:d=9%2f20%2f2012+9%3a30+PM
So I created a function that will concatenate to a parsed datepicker and time inside d.
function reservation(){
    var newValue = $('#datepicker').val() +' '+$('#heures').val();
    $('#datepicker').val(newValue);
    return true;
       }

the result that i have is this: d=27%2F09%2F2012+12%3A30+PM+12%3A30+PM+12%3A30+PM+12%3A30+PM+12%3A30+PM+12%3A30+PM
I dont understand why I got the time repeating 5 extra times.

A:

The function reservation i make is working, It was a Date format problem with Datepicker. Open Table reservation was waiting for MM/DD/YY while i was submitting DD/MM/YY.
So i just had to put this code to get the good date Format
$("#datepicker").datepicker({
            dateFormat:'mm/dd/yy',
            }); 

