# Class: Renderer

## jala.Date.Calendar.Renderer(calendar)

A default renderer to use in conjunction with jala.Date.Calendar

## Constructor

#### new Renderer(calendar)

Returns a new instance of the default calendar renderer.

##### Parameters:

Name | Type | Description
--- | --- | ---
`calendar` | jala.Date.Calendar | The calendar utilizing this renderer

Source:
  - jala/code/Date.js, line 415

##### Returns:

A newly created instance of jala.Date.Calendar.Renderer

### Members

#### calendar :jala.Date.Calendar

The calendar utilizing this renderer instance

##### Type:

- jala.Date.Calendar

Source:
  - jala/code/Date.js, line 427

#### html :helma.Html

An instance of helma.Html used for rendering the calendar

##### Type:

- helma.Html

Source:
  - jala/code/Date.js, line 421

### Methods

#### renderCalendar(date, body, prevMonth, nextMonth)

Renders the calendar directly to response.

##### Parameters:

Name | Type | Description
--- | --- | ---
`date` | Date | A date object representing this calendar's month and year. Please mind that the day will be set to the last date in this month.
`body` | String | The rendered calendar weeks including the day header (basically the whole kernel of the table).
`prevMonth` | Date | A date object set to the last available date of the previous month. This can be used to render a navigation link to the previous month.
`nextMonth` | Date | A date object set to the first available date of the next month. This can be used to render a navigation link to the next month.

Source:
  - jala/code/Date.js, line 511

#### renderDay(date, isExisting, isSelected)

Renders a single day within the calendar directly to response.

##### Parameters:

Name | Type | Description
--- | --- | ---
`date` | Date | A date instance representing the day within the calendar.
`isExisting` | Boolean | True if there is a child object in the calendar's collection to which the date cell should link to
`isSelected` | Boolean | True if this calendar day should be rendered as selected day.

Source:
  - jala/code/Date.js, line 463

#### renderDayHeader(text)

Renders a single cell in the calendar day header row directly to response.

##### Parameters:

Name | Type | Description
--- | --- | ---
`text` | String | The text to display in the header field.

Source:
  - jala/code/Date.js, line 441

#### renderPrevNextLink(date)

Renders a link to the previous or next month's calendar directly to response.

##### Parameters:

Name | Type | Description
--- | --- | ---
`date` | Date | A date object set to the previous or next available month. This can be null in case there is no previous or next month.

Source:
  - jala/code/Date.js, line 488

#### renderRow(row)

Renders a single calendar row directly to response.

##### Parameters:

Name | Type | Description
--- | --- | ---
`row` | String | The body of the calendar row.

Source:
  - jala/code/Date.js, line 450