title: MVC3 Cultures vs jQuery UI Date Formats
body: <p>I am having a problem with an MVC3 application using a jQuery UI DatePicker object.</p>
  
  <p>Within the MVC application, I ask the user to pick their required culture, i.e en-GB, which then formats all dates and currencies in the application in the british format.</p>
  
  <p>I can then access the formatter code for this via <code>Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern</code></p>
  
  <p>However, the format returned for UK dates is: <code>dd/MM/yyyy</code></p>
  
  <p>To format the resulting data from the jQuery UI datepicker, I need to specify a date format. But for UK format dates, I need to specify the format as <code>dd/mm/yy</code></p>
  
  <p>The simple solution would be to just use <code>Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern</code> in my jQuery calls to format the date, but obviously this gives a formatting inconsistency as this is interpreted differently by jQuery UI (<code>01/December/20112011</code> instead of <code>01/12/2011</code>)</p>
  
  <p>Is there any easy way around this? </p>
  
  <p>The only way I can think of doing it is asking the user twice what format to display dates in?</p>