Datepicker setDate

Datepicker setDate


Hi everyone,
If found something strange about the way setDate behaves when passing
a date object in parameter.
I use the fonction like this
var testDate = new Date();
alert(testDate); // Tue Apr 28 2009 10:24:26 GMT+0200
$('#myCalendar').datepicker('setDate', testDate);
alert(testDate); // Tue Apr 28 2009 00:00:00 GMT+0200
Why does the setDate function modifies the testDate object?
Is this normal? I didn't find anything about this subject on the
website.
Thanks a lot,
Best,
David