angular-ui / ui-calendar

A complete AngularJS directive for the Arshaw FullCalendar.
http://angular-ui.github.io/ui-calendar/
MIT License
1.49k stars 729 forks source link

Automatically add the first day of the month from angular locale #403

Open ilya-git opened 8 years ago

ilya-git commented 8 years ago

Please see this issue: https://github.com/angular-ui/ui-calendar/issues/282.

It is possible to add the first day of the month properly to the calendar. Now the days of week are loaded from angular locale, but not the first day of the week, which is available as well, so it should really be possible to do it automatically.

ilya-git commented 8 years ago

Got unlucky "not found" id for the pull request, but hope it's gonna be implemented :)

peterver commented 8 years ago

you can set the first day of the week using the 'firstDay' option for your fullcalendar config object.

http://fullcalendar.io/docs/display/firstDay/

However, i couldn't find any option in fullCalendar myself on configuring the first day of the month ?

ilya-git commented 8 years ago

Well, since that's an angular wrapper, then it should use the settings that are already available there. Day names e.g. are loaded from angular locale, and so should the first day of the week in my opinion. It can always be overridden with the setting you are referring to.

peterver commented 8 years ago

Not really, because the specific setting that you are referring to should not be prefilled based on locale. firstDay allows for overrides in cases where the first day of the week should be something different (uk), but there's a lot of international companies (even in the uk) that don't want this behavior (for consistency on an international level).

I do agree in a sense that if angular has already determined specific datasets ( such as locale ), that ui-calendar should use these to ease the configuration a bit. I might look into this :].

ilya-git commented 7 years ago

I am not asking to remove the property. It's logical that you want to override it, but getting the default value from angular locale instead of hardcoding makes sense to me :)