title: How to using jQuery to get current date on textbox
body: <p>This is my jQuery function but I'm not able to pass the current date and paste it into my textbox, it only able to select the date when doing onClick. </p>
  
  <p>What is need is I would like to select the current date and paste it into my textbox. </p>
  
  <pre><code>    gebo_datepicker = {
      init: function() {
          $('#dp1').datepicker();
          $('#dp2').datepicker();
  
          $('#dp_start').datepicker({format: "mm/dd/yyyy"}).on('changeDate', function(ev){
              var dateText = $(this).data('date');
  
              var endDateTextBox = $('#dp_end input');
              if (endDateTextBox.val() != '') {
                  var testStartDate = new Date(dateText);
                  var testEndDate = new Date(endDateTextBox.val());
                  if (testStartDate &gt; testEndDate) {
                      endDateTextBox.val(dateText);
                  }
              }
              else {
                  endDateTextBox.val(dateText);
              };
              $('#dp_end').datepicker('setStartDate', dateText);
              $('#dp_start').datepicker('hide');
          });
          $('#dp_end').datepicker({format: "mm/dd/yyyy"}).on('changeDate', function(ev){
              var dateText = $(this).data('date');
              var startDateTextBox = $('#dp_start input');
              if (startDateTextBox.val() != '') {
                  var testStartDate = new Date(startDateTextBox.val());
                  var testEndDate = new Date(dateText);
                  if (testStartDate &gt; testEndDate) {
                      startDateTextBox.val(dateText);
                  }
              }
              else {
                  startDateTextBox.val(dateText);
              };
              $('#dp_start').datepicker('setEndDate', dateText);
              $('#dp_end').datepicker('hide');
          });
          $('#dp_modal').datepicker();
      }
  };
  </code></pre>
  
  <p>And this is my textbox</p>
  
  <pre><code>&lt;div class="input-append date" id="dp_start"&gt;
  &lt;input class="span9" type="text" readonly="readonly" placeholder="Date Start" /&gt;&lt;span class="add-on"&gt;&lt;i class="splashy-calendar_day_up"&gt;&lt;/i&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>