material icon indicating copy to clipboard operation
material copied to clipboard

md-datepicker / $mdDateLocaleProvider needs option to set first day of the week

Open jb29 opened this issue 11 years ago • 4 comments

In md-datepicker the first day of the week is currently set to Sunday. In Germany for example, Monday is considered to be the first day of the week.

It would be very useful if we could change this in $mdDateLocaleProvider. Maybe there's already an undocumented option for that?

jb29 avatar Aug 25 '15 08:08 jb29

Without this option it's unusable in more countries ... +1

tolemac avatar Sep 07 '15 20:09 tolemac

I had originally thought that the Date.prototype.getDay method was locale-aware. Turns out that that is not the case. Will resolve this ASAP.

jelbourn avatar Sep 08 '15 18:09 jelbourn

Great, a pity that did not come to version 0.11.0.

Will be included in v0.11.1 milestone?

Thank you!

tolemac avatar Sep 10 '15 06:09 tolemac

I fixed this with the next code:

export default function run($mdDateLocale) {
  'ngInject';
  $mdDateLocale.firstDayOfWeek = 1;
}

vasiliy0s avatar Jul 23 '16 18:07 vasiliy0s