我有这个奇怪的错误,我使用PrimeNG在我的应用程序中显示DatePicker.当我尝试使用bootstrap的表单控件时,我遇到了一个可视错误.
这是我的模板:
<div class="form-group row"> <div class="form-group col-md-2"> <label for="valeur">Valeur</label> <input type="number" id="valeur" class="form-control" /> </div> <div class="form-group col-md-5"> <label for="dateDebut">Date de début</label> <p-calendar id="dateDebut" dateFormat="dd/mm/yy" styleClass="form-control" [showIcon]="true"></p-calendar> </div> <div class="form-group col-md-5"> <label for="dateFin">Date de fin</label> <p-calendar id="dateFin" dateFormat="dd/mm/yy" styleClass="form-control" [showIcon]="true"></p-calendar> </div> </div>
这是结果:
编辑
如果它有任何帮助,这里是生成的HTML:
<div class="form-group col-md-5" _ngcontent-scp-1=""> <label for="dateDebut" _ngcontent-scp-1="">Date de début</label> <p-calendar ng-reflect-show-icon="true" ng-reflect-date-format="dd/mm/yy" ng-reflect-style-class="form-control" styleclass="form-control" id="dateDebut" dateformat="dd/mm/yy" _ngcontent-scp-1=""> <!--template bindings={ "ng-reflect-ng-if": "true" }--> <span ng-reflect-initial-classes="form-control" class="form-control ui-calendar" ng-reflect-raw-class="ui-calendar"> <input id="dp1467976345328" ng-reflect-value="" class="hasDatepicker ui-inputtext ui-widget ui-state-default ui-corner-left" ng-reflect-raw-class="[object Object]" type="text"><!--template bindings={ "ng-reflect-ng-if": "true" }--><button ng-reflect-icon="fa-calendar" type="button" pbutton="" class="ui-datepicker-trigger ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only"><span class="ui-button-icon-left ui-c fa fa-fw fa-calendar"></span><span class="ui-button-text ui-c">ui-button</span></button> </span> <!--template bindings={ "ng-reflect-ng-if": "false" }--> </p-calendar> </div>