indrimuska / angular-moment-picker

Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
http://indrimuska.github.io/angular-moment-picker/
MIT License
527 stars 229 forks source link

Allow monday as first weekday #71

Open Ishy-Fishy opened 7 years ago

Ishy-Fishy commented 7 years ago

The picker is great but in some cases (different locales) I need to start the week from Monday.

As of now, I have to edit the source code (replace .startof('week') with 'isoweek'). It would be nice if there was an option for that.

indrimuska commented 7 years ago

Hi @Ishy-Fishy, first day of the week depends on the locale you set.

Actually there's no way to change this behavior, but if there's real need I can implement an ad-hoc feature to let you choose which day should be shown as first in the Month View.

Does your scenario really need to overcome the default/manual locale setting?

Ishy-Fishy commented 7 years ago

Isn't anything critical, but it would be nice to have. For some countries that aren't in the locale list

indrimuska commented 7 years ago

Well, ok I can add this feature. Just to know, which country are you interested in? :)

Ishy-Fishy commented 7 years ago

A few countries (like Bosnia & Herzegovina) that don't provide enough userbase to warrant a full webpage translation but should have the EU locale preset, en_IE doesn't work for some reason :(

alexdunne commented 7 years ago

@Ishy-Fishy Did you ever get round to fixing this? If not, did you add the moment locale script <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment-with-locales.js"></script>.

@indrimuska I think it may be worth adding a note to to the locales section reminding people to add this. I didn't spot that this file was required and couldn't figure out why the locales weren't changing the picker UI.