I am currently using the following p-calendar
component in my webpage:
<p-calendar [style]="{'width':'100%'}" [inputStyle]="{'width':'100%'}"
dateFormat="dd-mm-yy" [formControl]="start" [showTime]="true"
[showSeconds]="false" hourFormat="24" inputId="time">
</p-calendar>
This is the typescript declaration for start
:
start = new FormControl('', [Validators.required]);
Currently, when the page loads, the default time displayed is the time at which the page was opened. I would like to set the default time to 8:00am regardless of the current time of day, while keeping the calendar field blank. I have attempted to set a default date, but I am unable to set only the time as the date field keeps populating as well. Does anyone have a solution for setting a default time?