[FIXED] p calendar readonly not working in primeng


<p-calendar readonly="true" [showTime]="true" inputId="time" [hourFormat]="24" [minDate]="minDate" [maxDate]="tomorrow" inputId="range" [(ngModel)]="obj.date" formControlName="selectedDateTime">


Use [readonlyInput]="true" instead of readonly="true"

Note – readonlyInput when specified, prevents entering the date manually with keyboard. Default value is null

Reference – https://www.primefaces.org/primeng/showcase/#/calendar

Answered By – Rajesh K

Answer Checked By – Robin (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published