You have to bind the datepicker to the text box in the ready function.
<script type="text/javascript">
$(document).ready(function () {
$('#<%=TxtTo.ClientID%>').datepicker({
changeMonth: true,
changeYear: true,
yearRange: '-5:+0',
duration: 'fast',
dateFormat: 'dd-M-yy',
showAnim: 'slideDown',
maxDate: '0'
});
});
</script>