KoolCalendar Class [PHP]

Summary

Properties Description
AjaxEnabled Get or set whether KoolCalendar use ajax feature.
AjaxHandlePage Get or set the ajax handle page.
AjaxLoadingImage Get or set the loading image src.
ClientEvents Get or set the client-side event handle.
ClientMode Get or set whether KoolCalendar use client mode.
DayNameFormat Get or set the day name format in header of KoolCalendar.
EnableMultiSelect Get or set whether KoolCalendar allow user to do multi-selection.
EnableQuickMonthSelect Get or set whether the quick month selection is enabled.
EnableSelect Get or set whether KoolCalendar allow user to select date.
FastNavigationStep Get or set the step numbers of fast navigation.
FirstDayOfWeek Get or set the first day of week.
FocusedDate Get or set focused date in KoolCalendar.
Height Get or set the height of KoolCalendar.
id Get or set id of KoolCalendar
Localization Set the localization of KoolCalendar.
MonthLayout Get or set the layout of month.
MultiViewColumns Get or set the number of columns of KoolCalendar in multiview mode.
MultiViewRows Get or set the number of rows of KoolCalendar in multiview mode.
NavigateAnimation Get or set the settings of navigation animation.
Orientation Get or set the rendering orientation of month.
RangeMaxDate Get or set max date in KoolCalendar.
RangeMinDate Get or set min date in KoolCalendar.
scriptFolder Get or set the path to folder which contains KoolCalendar script.
SelectedDates Get or set the selected dates in KoolCalendar.
ShowColumnHeader Get or set whether KoolCalendar show column header.
ShowDayCellToolTips Get or set whether KoolCalendar show tooltip when mouse hovers the day.
ShowFastNavigation Get or set where KoolCalendar show fast navigation buttons.
ShowNavigation Get or set where KoolCalendar show navigation buttons.
ShowOtherMonthsDays Get or set whether KoolCalendar show other month days in month table.
ShowRowHeader Get or set whether KoolCalendar show row header.
ShowToday Get or set whether KoolCalendar highlight today date.
ShowViewSelector Get or set whether KoolCalendar show the view selector.
styleFolder Get or set folder which contain css style for KoolCalendar
UseColumnHeadersAsSelectors Get or set whether KoolCalendar use column header as date selector.
UseRowHeadersAsSelectors Get or set whether KoolCalendar use row header as date selector.
ViewSelectorText Get or set the text of view selector.
Width Get or set the width of KoolCalendar.
Methods Description
Init Initiate calendar.
AddSpecialDate Add special dates to calendar.
Render Render the KoolCalendar
RegisterScript Return html to register js library for KoolCalendar.
RegisterCSS Return html to register CSS for KoolCalendar
RenderCalendar Return html content of KoolCalendar body
StartupScript Return js code to inititate KoolCalendar

Properties Detail

AjaxEnabledTop

bool AjaxEnabled

Get or set whether KoolCalendar use ajax feature. The ajax feature require KoolAjax to be registered. In ajax mode, date selection and month navigation will be done at server-side with the help of KoolAjax.

Default value : false

Show/Hide Code

Supported from version: 1.0.0.0

AjaxHandlePageTop

string AjaxHandlePage

Get or set the ajax handle page. Sometime, it is more convenient if calendar ajax-handle is seperated from your main page. By setting this property, KoolCalendar will do callback to the ajax handle page that you specified. In the ajax handle page, you setup, init and render KoolCalendar in the same way as you do with the calendar in your main page.

Show/Hide Code

Supported from version: 1.0.0.0

AjaxLoadingImageTop

string AjaxLoadingImage

Get or set the loading image src. This image will be shown when calendar do callback.

Show/Hide Code

Supported from version: 1.0.0.0

ClientEventsTop

array ClientEvents

Get or set the client-side event handle.

Default value : 1

Show/Hide Code

Supported from version: 1.0.0.0

ClientModeTop

bool ClientMode

Get or set whether KoolCalendar use client mode. In client mode, the date selection and month navigation are performed at client.

Default value : false

Show/Hide Code

Supported from version: 1.0.0.0

DayNameFormatTop

string DayNameFormat

Get or set the day name format in header of KoolCalendar.

Default value : "Shortest"

Allowed values :

  • "Shortest" :
  • "Short" :
  • "FirstLetter" :
  • "FirstTwoLetters" :
  • "Full" :

Show/Hide Code

Supported from version: 1.0.0.0

EnableMultiSelectTop

bool EnableMultiSelect

Get or set whether KoolCalendar allow user to do multi-selection.

Default value : false

Show/Hide Code

Supported from version: 1.0.0.0

EnableQuickMonthSelectTop

bool EnableQuickMonthSelect

Get or set whether the quick month selection is enabled.

Default value : true

Show/Hide Code

Supported from version: 1.0.0.0

EnableSelectTop

bool EnableSelect

Get or set whether KoolCalendar allow user to select date.

Default value : true

Show/Hide Code

Supported from version: 1.0.0.0

FastNavigationStepTop

int FastNavigationStep

Get or set the step numbers of fast navigation.

Default value : 3

Show/Hide Code

Supported from version: 1.0.0.0

FirstDayOfWeekTop

int FirstDayOfWeek

Get or set the first day of week.

Default value : 0

Allowed values :

  • 0 : Sunday
  • 1 : Monday
  • 2 : Tuesday
  • 3 : Wednesday
  • 4 : Thursday
  • 5 : Friday
  • 6 : Saturday

Show/Hide Code

Supported from version: 1.0.0.0

FocusedDateTop

int FocusedDate

Get or set focused date in KoolCalendar. By setting this date, we will let KoolCalendar know the month to be shown.

Show/Hide Code

Supported from version: 1.0.0.0

HeightTop

string Height

Get or set the height of KoolCalendar.

Show/Hide Code

Supported from version: 1.0.0.0

idTop

string id

Get or set the id for KoolCalendar. This id will be use as variable name of KoolCalendar at client-side.

Show/Hide Code

Supported from version: 1.0.0.0

LocalizationTop

Localization Localization

Set the localization of KoolCalendar.

Show/Hide Code

Supported from version: 1.0.0.0

MonthLayoutTop

string MonthLayout

Get or set the layout of month.

Default value : "7x6"

Allowed values :

  • "7x6" : Display in 7x6 table
  • "14x3" : Display in 14x3 table
  • "21x2" : Display in 21x2 table

Show/Hide Code

Supported from version: 1.0.0.0

MultiViewColumnsTop

int MultiViewColumns

Get or set the number of columns of KoolCalendar in multiview mode.

Default value : 1

Show/Hide Code

Supported from version: 1.0.0.0

MultiViewRowsTop

int MultiViewRows

Get or set the number of rows of KoolCalendar in multiview mode.

Default value : 1

Show/Hide Code

Supported from version: 1.0.0.0

OrientationTop

string Orientation

Get or set the rendering orientation of month.

Allowed values :

  • "Horizontal" : Render month days horizontally.
  • "Vertical" : Render month days vertically.

Show/Hide Code

Supported from version: 1.0.0.0

RangeMaxDateTop

int RangeMaxDate

Get or set max date in KoolCalendar. User may not able to select the date after the RangeMaxDate.

Show/Hide Code

Supported from version: 1.0.0.0

RangeMinDateTop

int RangeMinDate

Get or set min date in KoolCalendar. User may not able to select the date prior to RangeMinDate.

Show/Hide Code

Supported from version: 1.0.0.0

scriptFolderTop

string scriptFolder

Get or set the path to folder which contains KoolCalendar script.

Show/Hide Code

Supported from version: 1.0.0.0

SelectedDatesTop

array SelectedDates

Get or set the selected dates in KoolCalendar. The information of selected dates will be accessed or set after calendar is initiated.

Show/Hide Code

Supported from version: 1.0.0.0

ShowColumnHeaderTop

bool ShowColumnHeader

Get or set whether KoolCalendar show column header.

Default value : true

Show/Hide Code

Supported from version: 1.0.0.0

ShowDayCellToolTipsTop

bool ShowDayCellToolTips

Get or set whether KoolCalendar show tooltip when mouse hovers the day.

Default value : true

Show/Hide Code

Supported from version: 1.0.0.0

ShowFastNavigationTop

bool ShowFastNavigation

Get or set where KoolCalendar show fast navigation buttons.

Default value : true

Show/Hide Code

Supported from version: 1.0.0.0

ShowNavigationTop

bool ShowNavigation

Get or set where KoolCalendar show navigation buttons.

Default value : true

Show/Hide Code

Supported from version: 1.0.0.0

ShowOtherMonthsDaysTop

bool ShowOtherMonthsDays

Get or set whether KoolCalendar show other month days in month table.

Default value : true

Show/Hide Code

Supported from version: 1.0.0.0

ShowRowHeaderTop

bool ShowRowHeader

Get or set whether KoolCalendar show row header.

Default value : true

Show/Hide Code

Supported from version: 1.0.0.0

ShowTodayTop

bool ShowToday

Get or set whether KoolCalendar highlight today date.

Default value : true

Show/Hide Code

Supported from version: 1.0.0.0

ShowViewSelectorTop

bool ShowViewSelector

Get or set whether KoolCalendar show the view selector.

Default value : false

Show/Hide Code

Supported from version: 1.0.0.0

styleFolderTop

string styleFolder

Get or set folder which contain css style for KoolCalendar

Show/Hide Code

Supported from version: 1.0.0.0

UseColumnHeadersAsSelectorsTop

bool UseColumnHeadersAsSelectors

Get or set whether KoolCalendar use column header as date selector.

Default value : true

Show/Hide Code

Supported from version: 1.0.0.0

UseRowHeadersAsSelectorsTop

bool UseRowHeadersAsSelectors

Get or set whether KoolCalendar use row header as date selector.

Default value : true

Show/Hide Code

Supported from version: 1.0.0.0

ViewSelectorTextTop

string ViewSelectorText

Get or set the text of view selector.

Default value : "x"

Show/Hide Code

Supported from version: 1.0.0.0

WidthTop

string Width

Get or set the width of KoolCalendar.

Show/Hide Code

Supported from version: 1.0.0.0

Methods Detail

InitTop

void Init()

Initiate calendar. This function should be called before calendar Render() function.

Show/Hide Code

Supported from version: 1.0.0.0

AddSpecialDateTop

void AddSpecialDate(int $date, [bool $disable], [string $css_class], [string $tooltip])

Add special dates to calendar.

Show/Hide Code

Supported from version: 1.1.0.0

RenderTop

void Render()

Render the KoolCalendar

Show/Hide Code

Supported from version: 1.0.0.0

RegisterScriptTop

string RegisterScript()

Return html to register js library for KoolCalendar.

Show/Hide Code

Supported from version: 1.0.0.0

RegisterCSSTop

string RegisterCSS()

Return html to register CSS for KoolCalendar

Show/Hide Code

Supported from version: 1.0.0.0

RenderCalendarTop

string RenderCalendar()

Return html content of KoolCalendar body

Show/Hide Code

Supported from version: 1.0.0.0

StartupScriptTop

string StartupScript()

Return js code to inititate KoolCalendar

Show/Hide Code

Supported from version: 1.0.0.0