Open otto-gebb opened 11 years ago
As a workaround I changed this line:
this.weekStart = options.weekStart || this.element.data('datepicker-weekstart') || 0;
to this:
this.weekStart = options.weekStart || this.element.data('datepicker-weekstart') || moment.fn._lang._week.dow;
Nice, I will try to apply this change soon
Well, I'm not sure this fix is the proper one, it clearly uses "private" properties, which are implementation details and are subject to change. I guess it's better to consult moment.js developers on how to properly get the thing via the public API. I couldn't find it in the documentation.
When I set the moment.js language to ru, for instance, the first day of week in the datepicker is Sunday, although in the Russian locale it's Monday and this info is stored in the moment.js language settings. I think the datepicker should use these as the defaults.