jQuery datepicker only works once and is not shown the second time

后端 未结 10 1209
庸人自扰
庸人自扰 2021-01-02 06:32

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

10条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-02 06:55

    I had a similar problem, but what happened to me was that the second time the dialog was loaded, the datapicker didn´t take the value.

    The problem was that I was loading a second time the dialog and these cause problems. The solution was to remove the dialog after close it, something like:

      $("#popupDialog").dialog("close");    
      $("#popupDialog").remove();
    

    I hope this helps anyone!

提交回复
热议问题