I am using the prime ng time picker
Is there any way (or work around) where I can have a text placeholder instead of a vacant time picker? (00:00)
<p-calendar #timePicker [timeOnly]="true" hourFormat="24> </p-calendar>
Or are there any time pickers that do allow text placeholders?
CodePudding user response:
I think you can bind a value of type Date in the p-calendar tag. This would display the date and time accordingly.
eg:
.html
<p-calendar #timePicker [timeOnly]="true" hourFormat="24" [(ngModel)]="currentDate"> </p-calendar>
.ts
currentDate: Date;
CodePudding user response:
According to documentation you can add placeholder
property:
<p-calendar #timePicker [timeOnly]="true" hourFormat="24" placeholder="'enter your placeholder here'"> </p-calendar>