0
votes

I'm trying to use the md-date-locale directive to overwrite angular material options for one date-picker input (as specified in https://material.angularjs.org/latest/api/directive/mdDatepicker) but it's not working.

Here is an example using the angular material example to test

md-date-locale="{ firstDayOfWeek: 2 }"

http://codepen.io/Hyperalpha/pen/gmwMdm

If it's not possible, I need to update datepicker options after loading (not in module.config() ).

Thanks

1

1 Answers

1
votes

You need to set firstDayOfWeek in config function then its working fine

myAppModule.config(function($mdDateLocaleProvider) {
  $mdDateLocaleProvider.firstDayOfWeek = 2;
});

Working codepen