在Primefaces中,如何更改日历字段的按钮所使用的图标?
例如,在以下字段中
<p:calendar value="#{calendarBean.date3}" id="popupButtonCal" showOn="button" />我想将图标更改为wink.gif。
我看过文档,但找不到它的属性。
更新:
我尝试了以下几点,取得了部分成功:
JSF:
<p:commandButton id="modalDialogButton" value="" onclick="dlg2.show();" type="button" icon="ui-calendar"/>CSS:
.ui-widget .ui-calendar {
background-image: url(#{resource['images:country_flag.gif']});
}问题:
p:commandButton按钮上的图像。但是,我收到了警告信息:
Apr 03, 2012 10:43:58 AM com.sun.faces.application.resource.ResourceHandlerImpl logMissingResource WARNING: JSF1064: Unable to find or serve resource, images/country_flag.gif.jsf.p:calendar上找不到应该重写的css样式。发布于 2012-04-04 08:38:19
尝尝这个
.ui-icon-calendar {
background-image: <your URL> !important;
background-position: center center !important;
width: 16px;
height: 16px;
}https://stackoverflow.com/questions/9981076
复制相似问题