I wanted to use the primeng calendar with month and year selector. I copy-paste the code example from their site, but I don't see the year selector. My Dependencies:
"primeicons": "^1.0.0", "primeng": "^6.1.2",
<p-calendar view="month" dateFormat="mm/yy"
[yearNavigator]="true" yearRange="2000:2030">
</p-calendar>
I can see only the months.
any ideas?
try to give it a ngModel then it will be shown correctly: ts:
public value;
constructor() {
this.value = new Date();
}
html:
<p-calendar [(ngModel)]="value" view="month" dateFormat="mm/yy" [yearNavigator]="true" yearRange="2000:2030"></p-calendar>
DEMO.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With