title: Jquery UI DatePicker, getting associated input text for default date
body: <p>I'm using Jquery Datepicker UI 1.8.20 with some server-side asp:TextBox (creation).
  To associate the Datepicker to the textboxes I add a class to them and then did the following after the body tag:</p>
  
  <pre><code> $('body').on('focus', ".datepicker_input", function() {
   ...
   });
  </code></pre>
  
  <p>This works fine but now, I'm also populating this text-boxes server-side with a date (in a predefined format dd-MM-yyyy) and I'm trying to put the datepicker default date to be the same of its textbox but so far I haven't been able to do it.</p>
  
  <p>A few tries I made:</p>
  
  <pre><code> $('body').on('focus', ".datepicker_input", function() {
      $(this).datepicker({
          defaultDate: $.datepicker.parseDate("dd-MM-yy", $(this).value),
   ...
   });
  </code></pre>
  
  <p>Error: Uncaught Invalid arguments</p>
  
  <pre><code> $('body').on('focus', ".datepicker_input", function() {
      $(this).datepicker({
          defaultDate: $.datepicker.parseDate("dd-MM-yy", this.value),
   ...
   });
  </code></pre>
  
  <p>Error: Uncaught Unknown name at position 3</p>
  
  <p>I tried to debug the jquery in chrome to see what $(this) was and I got the window object, so I guess this is the problem. I don't know how to call the associated object to the datepicker...</p>
  
  <p><strong>UPDATE 1 - Full DatePicker code</strong></p>
  
  <pre><code>$('body').on('focus', ".datepicker_input", function() {
      $(this).datepicker({
          defaultDate: $.datepicker.parseDate("dd-MM-yy", $(this).value),
          minDate: 0,
          beforeShowDay: $.datepicker.noWeekends,
          changeMonth: true,
          changeYear: true,
          numberOfMonths: 1
      });
  $.datepicker.regional['pt-PT'] = {
          closeText: 'Fechar',
          prevText: '',
          nextText: '',
          currentText: 'Hoje',
          monthNames: ['Janeiro', 'Fevereiro', 'Mar&amp;ccedil;o', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro',
                          'Outubro', 'Novembro', 'Dezembro'],
          monthNamesShort: ['Janeiro', 'Fevereiro', 'Mar&amp;ccedil;o', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro',
                          'Outubro', 'Novembro', 'Dezembro'],
          dayNames: ['Domingo', 'Segunda-feira', 'Ter&amp;ccedil;a-feira', 'Quarta-feira', 'Quinta-feira', 'Sexta-feira', 'Sabado'],
          dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
          dayNamesMin: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
          weekHeader: 'Sm',
          dateFormat: 'dd-mm-yy'
      };
      $.datepicker.setDefaults($.datepicker.regional['pt-PT']);
  </code></pre>