htmldatelocalewebshim

Webshim HTML5 polyfiller displays date in US format even though my browser is set to en-AU


I'm using the webshim polyfiller to get html5 forms support in ie8.

If I set the date, for example to 13/08/2014 (dd/mm/yyyy) , as soon as I click on the datepicker it reformats the date to US style (mm/dd/yyyy), eg:

08/13/2014

My browsers language is set to en-AU. How can I set the webshim date picker to use the Australian date format?


Solution

  • Webshim trys to use the lang attribute of your webpage, if this is set to 'en' or 'en-US' it will use 'en-US', if there is no lang attribute, webshim will automatically use the browser language if possible. If you want to override it, you can still simply use the webshim.activeLang method.