date picker

date picker

I have a date picker with id="datepicker" and I am trying to catch the click with this code, but it doesn't work.

< script type ="text/javascript">
$(document).ready( function () {

   $(
'#datepicker' ).datepicker().children().show();

   $(
'select[id$=datepicker]' ).click( function () {
      $(
"input[id$=TextBox1]" ).val($( "select[id$=datepicker]" ).val());
   });
});

</ script >