I'll need FTP access and a URL to reproduce the issue in order to debug it. The code looks right to me. If I had FTP access then I'd try writing the value to the page to see if it looked right and then maybe play with the datepicker settings if it did or look into what might be wrong with the value code if it didn't.