Is there a way to conceal the input field within the Primeng calendar so that only the icon is displayed? I prefer not to switch the p-calendar element to inline, but simply have the icon visible to open the calendar.
component.html
<div class="ui-g-12 ui-md-4">
<p-calendar class="foo-cal" appendTo="body" readonlyInput="true" dateFormat="yy/mm/dd" [(ngModel)]="date" [showIcon]="true"></p-calendar>
</div>
I've attempted the following, but it hasn't worked:
body .ui-calendar.ui-calendar-w-btn .ui-inputtext {
display: none !important;
}
p-calendar span input {
display: none !important;
}
However, if I manually add the display: none;
property using the browser devtools, it successfully hides the input field, leaving only the icon. Any suggestions on how to achieve this without having to modify the HTML file?