简体   繁体   中英

Eliminate “Today is <date>” string in MyFaces Tomahawk's popup inputCalendar

Does anyone know if there is any way I can remove the string "Today is " that is displayed at the bottom of the MyFaces Tomahawk's popup inputCalendar?

See the following screenshot:

http://myfaces.apache.org/tomahawk-project/tomahawk12/images/calendar_popup.png

I don't want the string "Today is Fri, 8 Jul 2005" shown at all. Is this possible?

Thanks.

You have to set an popupTodayString attribute for your calendar:

<t:inputCalendar id="dob"  
    maxlength="10" 
    value="#{myBackingBean.person.dateOfBirth}"
    monthYearRowClass="monthYearRowClass" 
    weekRowClass="weekRowClass" 
    dayCellClass="dayCellClass" 
    currentDayCellClass="currentDayCellClass"
    popupTodayString="HERE_GOES_EMPTY_STRING" 
    popupWeekString="Wk" renderAsPopup="true"
    renderPopupButtonAsImage="true" 
    popupDateFormat="MM/dd/yyyy"
    alt="Calendar" title="Calendar">
 </t:inputCalendar>

Second way to achive hide text is to override css class . You need for example Firebug to find css rule for this box and then set display:none;

.someCssClass div
{
    display:none;
}

Easiest way is probably to hide it with CSS. If you can find out the id or class of the element containing the "Today is...", add a CSS directive with "visibility: hidden" to it. There is a plugin to Firefox called Firebug (if you haven't heard of it already) that helps you inspect HTML elements and find out these things.

Assuming it looks something like

<div id="today">Today is Fri, 8 Jul 2005</div>

you would add a css directive like this in one of your css files.

div#today {
    visibility: hidden;
}

It will not "remove" the element, but it will not be displayed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM