<p-calendar readonly="true" [showTime]="true" inputId="time" [hourFormat]="24" [minDate]="minDate" [maxDate]="tomorrow" inputId="range" [(ngModel)]="obj.date" formControlName="selectedDateTime">
p calendar readonly not working in primeng
2.5k Views Asked by Asif Rana At
3
There are 3 best solutions below
0
On
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
0
On
I think when readonlyInput is true must be showOnFocus false Please see link https://github.com/primefaces/primeng/issues/10880
Readonly property doesn't exist in p-calendar. You can use the "disabled" property instead.