如何在primeNG日历中使用yearNavigator,选择模式为范围,numberOfMonths为2

问题描述

我正在寻找 PrimeNG 日历的年份导航器。

<p-calendar 
      [numberOfMonths]="2"
      [inline]="true"
      selectionMode="range"
      (onSelect)="onRangeSelection($event)"
      [(ngModel)]="daterange">
</p-calendar>

上述代码是我用来显示 2 个月日历的当前日历。 . This is how the calendar looks like

我的要求是我需要日历中的年份导航器。我尝试了以下代码,但无法获得年份下拉列表。

<p-calendar 
      [numberOfMonths]="2"
      [inline]="true"
      selectionMode="range"
      (onSelect)="onRangeSelection($event)"
      [(ngModel)]="daterange"
      [yearNavigator]="true"
      yearRange="2000:2030">
</p-calendar>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)