Using JQuery UI datepicker inside UpdatePanel [duplicate]

ぐ巨炮叔叔 提交于 2019-12-04 02:38:21

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!