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?
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;
According to documentation you can add placeholder property:
<p-calendar #timePicker [timeOnly]="true" hourFormat="24" placeholder="'enter your placeholder here'"> </p-calendar>
try this
<p-calendar inputId="calendar"
[showIcon]="true" formControlName="startDate"
class="form-control" date-format=" M/d/yy" [showTime]="true"
></p-calendar>