Angular-Material set a Datepicker with only months and years
问题 I'm using angular 1.5.9 & angular material design 1.1.1 I would like to add a Datepicker with months and years only, no days, it's for a credit card expiration field in a checkout form. 回答1: You can set md-mode="month" working demo below <md-input-container flex="100" layout="column"> <div style="font-size: 10px; color: blue;" label ng-bind="::dateFields[2].label"></div> <md-datepicker ng-model="dateFields.selectedDate" ng-required="dateFields.required" md-date-locale="dateFields.locale" md