title: jquery datepicker inside modal dialog
body: <p>This question has been asked but for different result. 
  People have had trouble using the date picker inside the modal dialog box and making the date picker show up (using the z-index property).</p>
  
  <p>However i have simply copied the js used to make the datepicker work from the foot, but in the  view for the modal popup. this then shows the date picker, but does not populate the selected input box with the selected date.</p>
  
  <p>my code that works everywhere else is the following:</p>
  
  <pre><code>$('#datepicker').datepicker({ dateFormat: 'yy-mm-dd' });
  </code></pre>
  
  <p>and the input in the modal dialog class is datepicker.</p>
  
  <p>Im not sure what the solution i am asking for would be really. as the function works everywhere and does indeed show up (suggesting the jquery is working) but just not populate the input box with the selected date....
  any ideas? ........</p>
  
  <pre><code>function modalfollow()
  {
  $('&lt;div&gt;').dialog({
      title:  'Add Follow',
      height: '350', 
      width:  '400',
      open: function ()
              {
              $(this).load('&lt;?=base_url();?&gt;leads/add_follow/&lt;?=$this-&gt;uri-&gt;segment(3);?&gt;/');
              },         
      modal: true 
      });
  // return false so &lt;a&gt; or &lt;button&gt; doesnt fire + reload page
  return false;
  }
  </code></pre>
  
  <p>this loads the modal box that loads the view.</p>
  
  <p>it is at this level the datepicker does not work.</p>