title: How to get the dateFormat from jQuery UI datepicker?
body: <p>In my page, the datepicker dateFormat option is being set automatically by loading a localized .js file according to the current users's language settings. Elsewhere in the page, I need to format some dates, so I'd like to get the dateFormat option back out of the datePicker.</p>
  
  <p>The <a href="http://docs.jquery.com/UI/Datepicker#method-option" rel="noreferrer">jQuery documentation says</a> you can retrieve the dateFormat option like so:</p>
  
  <pre><code>$('.selector').datepicker('option', 'dateFormat');
  </code></pre>
  
  <p>However, this returns a jQuery object wrapping the datePicker, not a string value as expected. Is this a bug? Is there another way to retrieve the dateValue option?</p>
  
  <p>I'm using jQuery 1.3.2 and jQuery UI 1.7.1.</p>
  
  <p>I know that I could simply look up the dateFormat another way, but pulling it out of the datepicker would be clean and elegant. </p>