BiCalendar

This class represents a calendar control

This class extends BiComponent and therefore all methods and fields available for BiComponent are also available for BiCalendar .

Constructor

new BiCalendar ( oDate )

Parameters

NameTypeOptionalDefaultDescripton
oDateDateOptional javascript date object used to determine the month that should be displayed when the calendar is created.

Properties

NameTypegetsetDescripton
captionTextStringcheckedThe text to show in the caption
currentDatevoidcheckedcheckedThe date describing the currently shown month. To get the selected date(s) use selectedDate(s)
dateFormatSymbolsBiDateFormatSymbolscheckedcheckedThe object providing the date picker with the symbols needed to display localized strings
maximumDatecheckedcheckedGetter for the maximum selectable date.
minimumDatecheckedcheckedGetter for the maximum selectable date.
scaleFontsBooleancheckedcheckedWhether to resize the font in the day labels and days when calendar is resized.
selectedDateDatecheckedcheckedThe selected date.
selectedDatesDate[]checkedcheckedThese are the selected dates. In case multiple selection is used then use this instead of selectedDate
selectionModelBiCalendarSelectionModelcheckedThis is the selection model used for the calendar
showCaptionBooleancheckedcheckedWhether to show the caption or not
showMonthButtonsBooleancheckedcheckedWhether to show the buttons that allow you to go to next or previous month in the caption
showYearButtonsBooleancheckedcheckedWhether to show the buttons that allow you to go to next or previous year in the caption

Methods

NameDescription
goToMonthGoes to the given month. Note that months are numbered from 0 to 11 in Javascript.
goToTodayGoes to today and selects that day
goToYearGoes to the given year
nextMonthGoes to the next month
nextYearGoes to the next year
previousMonthGoes to the previous month
previousYearGoes to the previous year
updateDateLabelThis is called when the date label should be updated. Override this to add custom drawing of the label

Events

NameTypeBubblesDescripton
actionBiEventThis event is fired when the user clicks on a day
changeBiEventThis event is fired when the selection changes

Static Methods

NameDescription
isSameDayThis returns true if two dates represent the same day
isSameMonthThis returns true if two dates represent the same month

Static Fields

None.

Remarks

None.

Method Details

goToMonth

Goes to the given month. Note that months are numbered from 0 to 11 in Javascript.

Syntax

object.goToMonth ( nMonth )

Parameters

NameTypeOptionalDefaultDescripton
nMonthNumberThe index of the month to go to

Return Type

void

goToToday

Goes to today and selects that day

Syntax

object.goToToday ( )

Parameters

No arguments.

Return Type

void

goToYear

Goes to the given year

Syntax

object.goToYear ( nFullYear )

Parameters

NameTypeOptionalDefaultDescripton
nFullYearNumberThe year to go to

Return Type

void

nextMonth

Goes to the next month

Syntax

object.nextMonth ( )

Parameters

No arguments.

Return Type

void

nextYear

Goes to the next year

Syntax

object.nextYear ( )

Parameters

No arguments.

Return Type

void

previousMonth

Goes to the previous month

Syntax

object.previousMonth ( )

Parameters

No arguments.

Return Type

void

previousYear

Goes to the previous year

Syntax

object.previousYear ( )

Parameters

No arguments.

Return Type

void

updateDateLabel

This is called when the date label should be updated. Override this to add custom drawing of the label

Syntax

object.updateDateLabel ( oDate,oLabel )

Parameters

NameTypeOptionalDefaultDescripton
oDateDateThe date object the label represents
oLabelBiLabelThe label to update

Return Type

void

Static Method Details

isSameDay

This returns true if two dates represent the same day

Syntax

BiCalendar . isSameDay ( d1,d2 )

Parameters

NameTypeOptionalDefaultDescripton
d1DateThe first date to compare
d2DateThe second date to compare

Return Type

Boolean

isSameMonth

This returns true if two dates represent the same month

Syntax

BiCalendar . isSameMonth ( d1,d2 )

Parameters

NameTypeOptionalDefaultDescripton
d1DateThe first date to compare
d2DateThe second date to compare

Return Type

Boolean