freqdec / datePicker

An attempt at writing a flexible, framework free, feature-rich and accessible datepicker
http://freqdec.github.io/datePicker/
MIT License
171 stars 56 forks source link

firstDayOfWeek not working with smart localization #69

Open depiction opened 8 years ago

depiction commented 8 years ago

I'm trying to change the first day of the week from Monday to Sunday.

In en.js I set firstDayOfWeek to 6 (for Sunday). The datepicker still shows Monday as the first day of the week.

If I explicitly include the en.js file before datepicker.js then reload the page, the first day of the week is set to Sunday.

The firstDayOfWeek setting cannot be changed if using the smart localization feature.

ehoyt1 commented 8 years ago

I too am having the same issue with the firstDayOfWeek setting in en.js not being called. I have tried setting the language in the <html> tag, as well as content-language <meta> tag on the page using the datepicker to see if the setting would be picked up.

depiction commented 8 years ago

For me the language files are loading based on the lang attribute on the html tag, but it's only reading strings. For example, if I add lang="fr" to the html tag, all strings within the date picker are French. Settings like firstDayOfWeek are ignored in favor of their default values.

ehoyt1 commented 8 years ago

Updated my previous comment. @depiction, I can't even get that far. From what I can see the en.js file isn't even being called. Do you mind posting some sample code?