title: Datepicker won't function inside colorbox
body: <p>Here the scenario:<br>
  I want to apply a datepicker on a input field in a form.<br>
  When clicking a link a colorbox will open containing the form.</p>
  
  <p>Somehow the datepicker doesn't work, so I searched the internet.<br>
  I was confused by this post <a href="https://stackoverflow.com/questions/4809391/jquery-ui-datepicker-inside-a-thickbox">datepicker inside a thickbox</a> where the following statement was made:
  <strong>JavaScript/jQuery is not working inside of ColorBox.</strong><br>
  It confused me because other people seem to have worked it out.</p>
  
  <p>I'll show the code of the colorbox call:</p>
  
  <pre><code>        &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
                  $(".customer").colorbox(
                  {
                    transition:'fade',
                      width:'750',
                      speed:'500',
                      height:'400',
                      iframe:true
                  });
          });
          &lt;/script&gt;
  </code></pre>
  
  <p>The colorbox opens successfully although my error console says there is a } missing after the first }); occurrence.</p>
  
  <p>The code for the datepicker:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;$(document).ready(function() {
      $('.datepick').datepicker({
      changeYear:true,
      yearRange:'c-65:c+0',
      changeMonth:true
      });
      $('.datepick').datepicker($.datepicker.regional['nl']);});&lt;/script&gt;
  </code></pre>
  
  <p>This code does work somewhere else on my website where it is not located in a colorbox.  </p>
  
  <p>What I have tried:</p>
  
  <ol>
  <li>I tried to give the class datepick a z-index of 10000 or higher since colorbox has a z-index of 9999 by default.</li>
  <li>I tried the oncomplete function() on the colorbox, but couldn't get the colorbox work when applied.</li>
  <li>I tried setting iframe to false in combination with the previous two options.</li>
  </ol>
  
  <p>My question(s):  </p>
  
  <ol>
  <li>Is it possible to have a datepicker working inside a colorbox?</li>
  <li>Is my code about the colorbox correct?</li>
  <li>How to fix it?!</li>
  </ol>
  
  <p><strong>UPDATE</strong><br>
  Solution: I made a stupid mistake :P...<br>
  Yet I found the answers on my first question, which may be of some value.  </p>
  
  <ol>
  <li>Yes it is possible to have a datepicker working inside a colorbox without using the onComplete:function().</li>
  </ol>