title: DatePicker not working in ajax loaded page
body: <p>I attach the datepicker to inputs in a global script file with like this:</p>
  
  <pre><code>$(document).on("focusin",".datePick", function () {
              $(this).datepicker({
                  dateFormat: "dd/mm/yy",
                  changeMonth: true,
                  changeYear: true,
                  onClose: function () { $(this).valid(); }
              });
          });
  </code></pre>
  
  <p>On a specific page, there are inputs(which will be used with datepicker) in a modal dialog(also jquery ui) and I call that page via $.load() and inject into a div in other page.</p>
  
  <p>The code above works very well for static inputs in other pages but for the scenerio above, it shows the datepicker dialog fine but when I click on a date, it throws error(f is undefined)Edit: VS2010 throws "Unable to set value of the property 'currentDay': object is null or undefined"</p>
  
  <p>Some people suggested to use live() method, but I dont want to use deprecated method.. What  should I do about the issue?</p>
  
  <p>Thanks in advance</p>
  
  <p>Ozgu</p>