I have successfully converted the button to an image.  It's not that hard, you 
just have to go to the source code and modify here and there. 

I have attached the source changes I made.  

        private String getScriptBtnText(String clientId, String dateFormat, 
String popupButtonString) {
                StringBuffer script = new StringBuffer();

                script.append(
                        "<img src='"
                                + 
AddResource.getResourceMappedPath("/images/controls/calendar/date.gif", 
pageContext)
                                + "' onclick='"
                                + "jscalendarPopUpCalendar(this, document."
                                + getFormName()
                                + "."
                                + property
                                + ",\"");
                script.append(dateFormat);
                script.append("\" , \"" + getTodayInyyyyMMdd());
                script.append("\")' ");

                script.append("onmouseover=\"this.style.cursor='hand';\" ");
                script.append("onmouseout=\"this.style.cursor='default';\" ");
                script.append("/>");

                return script.toString();
        }

There are a few other places where changes are necessary, but it's really not 
that hard to do it yourself.


-----Original Message-----
From: Bruno Aranda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 03, 2005 7:02 PM
To: MyFaces Discussion
Subject: Re: inputCalendar Component Questions


Hi Brendan

I've submitted a fix for #1 now and it should be available in the svn
and in the next nighlty. Please, if you can test it to see if this is
what you need....

#2 is a popular demand. I think we could allow the possibility to
render the button or an image using a new attribute
('renderButtonAsImage'?) We could have a standard default image, that
could be overriden by another image provided using an
'imageButtonUrl'? attribute). This might be easy to do and
straight-forward.

#3 You can use the styleClasses attributes provided in the component:
monthYearRowClass, weekRowClass, dayCellClass, currentDayCellClass. It
isn't enough for you? :-)

Best regards,

Bruno

2005/8/1, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]>:
> I have some questions about the "popup" version of the inputCalendar
> component:
> 
> 1. If I specify a styleClass for inputCalendar that specifies a new
> font-size, and if that font size is smaller than the default font-size,
> the text box containing the textual representation of the date becomes
> shorter (as expected), but the button beside it remains the same height,
> giving the component an awkward look.  Is there a way to address this so
> that both controls are the same height if a new font-size is specified?
> 
> 2. Is there a way to specify an image link, rather than a button, to
> launch the pop-up calendar
> 
> 3. Is there a way to increase the font-size in the pop-up window?
> 
> Thanks,
> 
> - Brendan
>

Reply via email to