Datepicker: starting-day not working with localized date
Specifying an starting-day with a localized version of the date filter makes it not work. I've made a plunkr on it:
http://plnkr.co/edit/gKSC4cjQcWxJvamR9lli
Can you explain a little more in detail? Do you mean that the formatting is not being applied to the input on initialization?
Assuming that the initial formatting is the issue, this appears to be fixed in master - you can see it working with this Plunker.
The issue is that even when I'm defining starting-day="1", the week showed up on the calendar starts on Sunday. Indeed, I tried with several values on "starting-day" (2,3,4...) and the week keeps starting on Sunday. The Plunker you have linked has the same issue.
Ah, I understand now. This indeed is a bug with the feature.
+1
+1
+1
Please do not +1 an issue - it serves only as noise.
So this turns out to actually be a usage issue - see this Plunker.
What happened is that the configuration should have been inside the datepicker-options attribute, which is bound to a value from your $scope.
Then can you please change the doc for the datepicker? It actually says that you "can" pass the configuration using the datepicker-options attribute. It should say you "must" use that attribute.
@nbkaladan, we've captured this in #4798.
vm.startOptions = { minDate: new Date(), dateDisabled: disabled, startingDay: 1 }
in html
input id="field_staringDate" type="text" class="form-control" name="staringDate" required ng-change="vm.change()" datepicker-options="vm.startOptions" uib-datepicker-popup="MM/dd/yyyy" ng-model="vm.patientOrderTest.staringDate" ng-disabled="test.patientOrderItems.length > 0" is-open="vm.datePickerOpenStatus.staringDate"