Primary surfaces: how to change the default icon on a calendar field button?
In Primefaces, how do I change the icon that is used by a calendar field button?
For example, in the following field
<p:calendar value="#{calendarBean.date3}" id="popupButtonCal" showOn="button" />
I want to change the icon to http://forum.primefaces.org/images/smilies/icon_e_wink.gif .
I have looked through the documentation but I cannot find an attribute for this.
UPDATE:
I have tried the following with partial success:
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']});
}
<strong> PROBLEMS:
-
Now I can see the image on the button
p:commandButton
. But I am getting a warning: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.
-
I couldn't find the CSS style in
p:calendar
which I have to override to change the image on the calendar button.
source to share