How to get a year datepicker in AngularJS Material

2019-09-15 00:20发布

Are there any md-year pickers available? if yes, please share me some links. If no, then is it possible to turn a md-datepicker into a year picker?

I have tried with a normal one with giving modes, types of models etc but no useful output.

1条回答
放我归山
2楼-- · 2019-09-15 00:57

In the docs on <md-datepicker>, there is an option for a year picker by using the md-current-view attribute, setting it to either year or month:

<md-datepicker
    md-current-view="year"
    ng-model="myCustomYearDate"
    md-placeholder="Enter Date">
</md-datepicker>
查看更多
登录 后发表回答