ASP.NET MVC3 / jQuery 1.9.1 / jQuery UI 1.10.2
I\'ve got a page on which I open a modal dialog after clicking on an Ajax.ActionLink
. Inside this dialog
It is opened via an Ajax.ActionLink which updates a target id (div) via the UpdateTargetId property. The controller action returning the contents for the modal dialog queries a web service and then returns a partial view with a populated model.
then you need to call the datepciker function again after the partial view is populated... inside callback function of ajax(if you are using that)...
$.ajax({
success:function(){
//your stuff
$("#datepicker").datepicker();
}
});
datepikcker won't be able to call a function for dynamically added element... since your target div is not present at the time when the datepicker is first called... you need to call the datepicker function again for if to work for added target DIV
updated
OnSuccess = "openPopup()"
.....
function openPopup(){
//your codes
$("#datepicker").datepicker(); //call date picker function to the added element again
}