Calendar may use a special Data Model to provide data for element rendering. You can re-define the default Calendar Model using the dataModel attribute pointed to the object that implements CalendarDataModel interface.

CalendarDataModel has the following methods:

- CalendarDataModelItem[] getData(Date[]) is called every time when components need the next block of CalendarDataItems. That may happens when the calendar is rendered, or when you navigate to the next/previous month or in any other case when the calendar is rendered. This method is called in an Ajax mode when the calendar renders a new page.
- Object getToolTip(Date) is used when tool tips are displayed in "single" mode.

CalendarDataModelItem provides the following methods:

- Boolean isEnabled() returns true if date is "selectable" on the calendar, the default implementation returns true
- String getStyleClass() returns String that is appended to a style class for the date span. For example it may be "relevant holiday" that mean a class lools like "rich-cal-day relevant holiday". The default implementation returns an empty string.
- Object getData() returns any additional payload that must be a JSON-serializable object. It may be used in the custom date representation on the calendar (inside the custom facet).
- Boolean hasToolTip() returns true if the given date has an associated one with it tooltip data. The default implementation returns false.
- Object getToolTip() returns tool tip data that is used in a "batch" tooltip loading mode.

Note: Tooltips and date disablement isn't supported in the current implementation on the client side. It will be implemented in the next releases.