title: jquery Datepicker setdate change format
body: <p>I am using jquery UI datepicker on MVC2 to set my startdate picker.</p>
  
  <p>When I go to the 'create' view, I want the datepicker to hold its minimal value- which is today.</p>
  
  <p>But for some reason I see the date format string like this: mm/dd/yyyy HH:MM:SS AM or PM.
  only before the user pick a date- after the user picks a date I get the format that I want: mm/dd/yyyy in both of my datepickers- dateStart and dateEnd</p>
  
  <p>and when I go to edit, I get the value from the database (date datatype) and have the same problem.
  this is my code:</p>
  
  <pre><code>$(function () {
          var buttonImage = $(".selector").datepicker("option", "buttonImage"); // date image
  
          // Datepicker
          $('#DateStart').datepicker({
              inline: true,
              showOn: 'both',
              buttonImage: '/Content/calandar2.gif',
              minDate: '+0',
              dateFormat: 'mm/dd/yy',
              onSelect: function (dateStr) {
                  var min = $(this).datepicker('getDate') || new Date(); // Selected date or today if none
                  $('#DateEnd').datepicker('option', { minDate: min });
              }
          });
  
          $('#DateEnd').datepicker({
              inline: true,
              showOn: 'both',
              buttonImage: '/Content/calandar2.gif',
              dateFormat: 'mm/dd/yy',
              minDate: '+0'
          });
  }
  </code></pre>
  
  <p>THANK YOU!!!</p>