PrimeNG calendar component has four style attributes, two for adding inline styles and two for adding style classes ( css ) - style , styleClass , inputStyle and inputStyleClass .
style and styleClass are used to stylize the component itself (calendar)inputStyle and inputStyleClass are used to enter an input field
So this behavior is not an error , it is the expected behavior because you are using the wrong attribute. If you want to add a form-control class to the PrimeNG calendar input field, you should use inputStyleClass instead of the styleClass attribute:
<div class="form-group col-md-5"> <label for="dateFin">Date de fin</label> <p-calendar id="dateFin" dateFormat="dd/mm/yy" inputStyleClass="form-control" [showIcon]="true"></p-calendar> </div>
Check the entire list of attributes for the PrimeNG calendar component here .
source share