0
votes

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?

3

3 Answers

3
votes

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.

1
votes

For some reason webshim is not picking up the locale from the browser. I had to set it manually like so:

webshim.activeLang('en-AU');

0
votes

You could set Webshim's language to the browser's default language by:

webshim.activeLang(navigator.language || navigator.userLanguage);

As far as I've tested quickly, Webshim fallbacks to 'EN' if doesn't support the requested language.