angular – NgbDatepicker仅显示月份和年份

前端之家收集整理的这篇文章主要介绍了angular – NgbDatepicker仅显示月份和年份前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在开发一个使用Bootstrap 4组件的应用程序,由Angular 4提供支持,我无法配置NgbDatepicker指令,只显示月份和年份,而不是日期 – 就像信用卡一样.

我想只选择月份和年份,我不关心选择特定的一天.

我的输入如下:


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

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

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

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

解决方法

https://ng-bootstrap.github.io/#/components/datepicker的现有实施不支持选择月份 – 它是日期选择器.

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

猜你在找的Angularjs相关文章