aspose file tools*
The moose likes JSF and the fly likes Adding Calender Control Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Adding Calender Control" Watch "Adding Calender Control" New topic
Author

Adding Calender Control

komal ekbote
Greenhorn

Joined: Jun 20, 2007
Posts: 17
Hello Ranchers,
Can anybody please tell me how to use Calendar Control using the MyFaces Tomahawk?
mano ranjan
Ranch Hand

Joined: Jul 12, 2007
Posts: 102
Hi,
Use <t:inputCalendar renderAsPopup="true">

thanks
komal ekbote
Greenhorn

Joined: Jun 20, 2007
Posts: 17
Thankyou mano,

Got it...Is there any way through which we can change the default image displayed for the popup calender.
mano ranjan
Ranch Hand

Joined: Jul 12, 2007
Posts: 102
Hi,
It can be done by applying css for a particular row or row.check the attributes available for input calender.

thanks
mano
komal ekbote
Greenhorn

Joined: Jun 20, 2007
Posts: 17
I have tried with the following code to CSS with the popup Calendar..
But any how the CSS is not being applied to the Calendar.

Can Anyone please help.




<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>First page</title>
</head>
<body>
<h2> Example for Calendar Control</h2>
<f:view>
<t:document>
<t:documentHead>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>t:inputCalendar example</title>
<style type="text/css">

.yearRowStyle {
background-color: #A8D1E8;
color: green;
text-align: center;
font-weight: bold;
font-style:italic;
}
.weekRowStyle {
background-color: #D6EBFC;
}
.selectedDayCellStyle {
background-color: #ECD5D2;
}

</style>
</t:documentHead>
<t:documentBody ><center>

<h:form id="addMFForm">
<hutputText id="out" value="DATE::" />

<t:inputCalendar id="cal"
renderAsPopup ="true"
popupButtonStyle ="true"
popupButtonStyleClass="true"

monthYearRowClass="yearRowStyle"
weekRowClass="weekRowStyle"
currentDayCellClass="selectedDayCellStyle"

renderPopupButtonAsImage ="true"
popupButtonImageUrl ="Images/calendar.gif"

helpText="MM/DD/YYYY" />
</h:form></center>
</t:documentBody>
</t:document>

</f:view>
</body>
</html>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding Calender Control