Thanks Jim,
Although it didn't didn't directly solve the problem. Having your working code certainly allowed me to check things.
My construct came from help pages and included a line
<script type="text/javascript" src="../jquery/ui/ui.datepicker.js"></script>
I noticed that your solution did not include the js file. So I removed it.
It started working.
I could have spent a long time looking. Thanks for your help.
Kerry