Before datepicker('setDate', d);
After datepicker('setDate', d);

The time of 'd' is manipulated. I don't like this. 'setDate' should make a clone.