I'm trying to open the calendar with PrimeNG label but everytime I click on the label won't open the calendar, here my code: import {CalendarModule} from 'primeng/calendar';
@NgModule({
declarations: [
AppComponent,
StoreMenuComponent
],
imports: [
BrowserModule,
AppRoutingModule,
ButtonModule,
InputTextModule,
FormsModule,
InputNumberModule,
CalendarModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
component.ts
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
myDate1!: Date;
myEvent(evt: any)
{
console.warn(evt)
}
}
component.html
</div>
<div class="field col-12 md:col-4">
<label for="icon">Icon</label>
<p-calendar [(ngModel)]="myDate1" [showIcon]="true" inputId="icon"></p-calendar>
</div>
every other primeNG component working I have a problem with just this, thanks who gonna answer me
At the ended I resolved by adding:
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
in the module