title: Execute .bind event onLoad for Jquery Date Picker
body: <p>I am using <a href="http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/" rel="nofollow">kelvin lucks jquery date picker</a>.</p>
  
  <p>I have a start and end date picker set up so that when the start date is selected it assigns that same date to the end date and the end date insures that its calendar does not allow selecting of any dates before the start date. </p>
  
  <p>Works great except if you select the end date without touching the start date you are able to set an end date before the start date. Not good!</p>
  
  <pre><code>$(function()
  {
      $('.date-pick').datePicker({startDate:'2000-01-01', clickInput:true})
  
          $('#start-date').bind('dpClosed', function(e, selectedDates) {
                  var d = selectedDates[0];
                  if (d) {
              d = new Date(d);
              $('#end-date').dpSetStartDate(d.addDays(0).asString()).dpSetSelected(d.asString()).val($(this).val());
          }
      });
  });
  </code></pre>
  
  <p>Because I am prefilling the input fields using PHP, all I want to do is trigger <code>$('#end-date').dpSetStartDate</code> so that the end date updates when the document loads. At the moment it only updates on <code>$('#start-date').bind('dpClosed', function(e, selectedDates) {</code></p>
  
  <p>How do I do this?</p>
  
  <p>Thanks,</p>
  
  <p>Tim</p>