NgbDatepicker仅显示月份和年份

Noi*_* A. 6 ng-bootstrap angular

我正在使用由Angular 4驱动的Bootstrap 4组件开发应用程序,并且在配置NgbDatepicker指令以仅显示月份和年份而不显示日期时遇到了麻烦(例如信用卡)。

我只想选择月份和年份,我不在乎选择特定的日子。

我的输入如下所示:

<input id =“ demodate” type =“ text” name =“ demodate” ngbDatepicker
#startDateDp =“ ngbDatepicker” [(ngModel)] =“ modelDate” />

我尝试了为此处列出的指令列出的所有属性

https://ng-bootstrap.github.io/#/components/datepicker

但他们似乎都没有帮助我。有任何想法吗?

pko*_*rce 0

https://ng-bootstrap.github.io/#/components/datepicker的现有实现不支持选择月+年 - 它是一个日期选择器。

您可以尝试在https://github.com/ng-bootstrap/ng-bootstrap/issues中打开功能请求