Project Documentation
Foundation

Description

Renders a calendar component allowing to choose a date from a month view. Change the month by navigating in the header bar.

The calendar component is automatically rendered using the week-names, the month-names and the start of the week of the current locale, so localisation support is given (for an example, see the myfaces examples and change the current locale under options).

Screen Shots

Popup No Popup
calendar_popup
calendar_nopopup

API

since 1.0.0 alpha
author Martin Marinschek
component-family javax.faces.Input
renderer-type org.apache.myfaces.Calendar
component-class org.apache.myfaces.custom.calendar.HtmlInputCalendar
renderer-class org.apache.myfaces.custom.calendar.HtmlCalendarRenderer
tag-class org.apache.myfaces.custom.calendar.HtmlInputCalendarTag

Usage

<t:inputCalendar [ HTML universal attributes ]
               [ HTML event handler attributes ]
               [ UIInput standard attributes (i.e. valueChangeListener) ]
               [monthYearRowClass="month-and-year-header-row-css-class"]
               [weekRowClass="week-header-row-css-class"]
               [dayCellClass="empty-or-date-cell-css-class"]
               [currentDayCellClass="currently-selected-day-cell-css-class"]>
</t:inputCalendar>
            

Syntax

<t:inputCalendar/>

monthYearRowClass - CSS class to be used for the header-row showing month and year.
weekRowClass - CSS class to be used for the header-row showing the week-days.
dayCellClass - CSS class to be used for the cells showing days.
currentDayCellClass - CSS class to be used for the cell of the currently selected date.
renderAsPopup - Render the input-calendar as a java-script popup on client.
addResources - Automatically add the input-calendar scripts and css files to the header, set that to false to provide the scripts yourself.
popupDateFormat - Defines the date format used by the java-script popup on client.
popupButtonString - Defines the string displayed on the button which leads to the calendar-popup-window (... by default).
popupButtonStyle - Defines the css style for the button which leads to the calendar-popup-window.
popupButtonStyleClass - Defines the css style class for the button which leads to the calendar-popup-window.
popupGotoString - Set the string for "Go To Current Month".
popupTodayString - Set the string for "Today is".
popupWeekString - Set the string for "Wk".
popupScrollLeftMessage - Set the string for scrolling to the left.
popupScrollRightMessage - Set the string for scrolling to the right.
popupSelectMonthMessage - Set the string for "Click to select a month".
popupSelectYearMessage - Set the string for "Click to select a year".
popupSelectDateMessage - Set the string for "Select [date] as date" (do not replace [date], it will be replaced by the current date).
renderPopupButtonAsImage - [true|false] If true, renders a calendar icon instead of the button to pop up the calendar. Default is 'false'.

Instructions

Standard core tags (i.e. a new Converter can be set for value-bindings to values other than java.util.Date).

see examples/calendar.jsp for an example!