freqdec / datePicker

An attempt at writing a flexible, framework free, feature-rich and accessible datepicker

Home Page:http://freqdec.github.io/datePicker/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

firstDayOfWeek not working with smart localization

depiction opened this issue · comments

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.

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.

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.

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?