"Can't bind to 'ngModel' since it isn't a known property of 'p-calendar'" error message trying to use PrimeNG component, why?
Add FormsModule
in your AppModule
:
// ...import { FormsModule } from '@angular/forms';// ...@NgModule({ // ... imports: [ BrowserModule, FormsModule, CalendarModule ], // ...})export class AppModule { }
This will not solve your problem, but I had the same error when I try to use formControlName attribute :
<p-calendar [(ngModel)]="value" formControlName="debutaffichage"></p-calendar>