Search code examples
javascriptangularplaceholdertimepicker

PrimeNG - what are my options for adding a placeholder for a time picker?


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?


Solution

  • According to documentation you can add placeholder property:

    <p-calendar #timePicker [timeOnly]="true" hourFormat="24" placeholder="'enter your placeholder here'"> </p-calendar>