Using JQuery UI datepicker inside UpdatePanel [duplicate]
Then you put your controls into the panels, they can change they unique ID.try this for your code:
var dates = $("#<%= txtDatePicker.ClientID %>").datepicker(
or move your code to the
$(document).ready(function() { // Handler for .ready() called.});
Also there is a space into your selector:
var dates = $(" #txtDatePicker").datepicker(
instead of:
var dates = $("#txtDatePicker").datepicker(
Then using the UpdatePanel and AJAX toolkit, you should use initializers during
function pageLoad(){ // MS AJAX - UpdatePanel initialize InitializeDatePicker();}
for the controls in the UpdatePanel, and during
$(document).ready(function() { // jQuery AssignFrameHeight();});
for jquery controls outside the UpdatePanel.