Date |
_pageDate
A Date object representing the month/year that the calendar is initially set to
|
Array |
_renderStack
A copy of the initial render functions created before rendering.
|
Array |
_selectedDates
The private list of initially selected dates.
|
Array[](Integer[]) |
cellDates
The collection of calendar cell dates that is parallel to the cells collection.
|
HTMLTableCellElement[] |
cells
The collection of calendar table cells
|
Object |
Config
The configuration object used to set up the calendars various locale and style options.
|
HTMLTableCellElement |
headerCell
The HTML cell element that represents the main header cell TH used in the calendar table
|
String |
id
The id that uniquely identifies this calendar.
|
Date |
maxDate
A Date object representing the maximum selectable date
|
Date |
minDate
A Date object representing the minimum selectable date
|
HTMLElement |
oDomContainer
The DOM element reference that points to this calendar's container element.
|
Date |
pageDate
A Date object representing the month/year that the calendar is currently set to
|
CalendarGroup |
parent
The parent CalendarGroup, only to be set explicitly by the parent group
|
Array[] |
renderStack
The list of render functions, along with required parameters, used to render cells.
|
Array[](Integer[]) |
selectedDates
The list of currently selected dates.
|
Boolean |
shellRendered
A boolean indicating whether the shell of the calendar has already been rendered to the page
|
HTMLTableElement |
table
The HTML table element that represents this calendar
|
Date |
today
A Date object representing today's date.
|
HTMLTableCellElement[] |
weekFooterCells
The collection of calendar week footer cells
|
HTMLTableCellElement[] |
weekHeaderCells
The collection of calendar week header cells
|
String |
DATE
Type constant used for renderers to represent an individual date (M/D/Y)
|
Integer |
DISPLAY_DAYS
Constant that represents the total number of date cells that are displayed in a given month
including
|
String |
MONTH
Type constant used for renderers to represent a month across any year
|
String |
MONTH_DAY
Type constant used for renderers to represent an individual date across any year (M/D)
|
String |
RANGE
Type constant used for renderers to represent a range of individual dates (M/D/Y-M/D/Y)
|
String |
STOP_RENDER
Constant used for halting the execution of the remainder of the render stack
|
String |
WEEKDAY
Type constant used for renderers to represent a weekday
|
Class YAHOO.widget.Calendar_Core
Object | +--YAHOO.widget.Calendar_Core
- Direct Known Subclasses:
- YAHOO.widget.Calendar2up_Cal, YAHOO.widget.Calendar
class
YAHOO.widget.Calendar_Core
Field Summary [top]
Method Summary [top]
void |
_addRenderer
The private method used for adding cell renderers to the local render stack.
|
Boolean |
_fieldArraysAreEqual
Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
|
Integer |
_indexOfSelectedFieldArray
Gets the index of a date field array [yyyy,mm,dd] in the current list of selected dates.
|
Array[](Integer[]) |
_parseDate
Converts a date string to a date field array
|
Array[](Integer[]) |
_parseDates
Converts a multi or single-date string to an array of date field arrays
|
Array[](Integer[]) |
_parseRange
Converts a date range to the full list of included dates
|
Date |
_toDate
Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
|
Array[](Integer[]) |
_toFieldArray
Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
|
void |
_unload
|
void |
addMonthRenderer
Adds a month to the render stack.
|
void |
addMonths
Adds the designated number of months to the current calendar month, and sets the current
calendar page date to the new month.
|
void |
addRenderer
Adds a renderer to the render stack.
|
void |
addWeekdayRenderer
Adds a weekday to the render stack.
|
void |
addYears
Adds the designated number of years to the current calendar, and sets the current
calendar page date to the new month.
|
String |
buildDayLabel
Builds the date digit that will be displayed in calendar cells
|
String |
buildMonthLabel
Builds the date label that will be displayed in the calendar header or
footer, depending on configuration.
|
void |
buildShell
Builds the calendar table shell that will be filled in with dates and formatting.
|
void |
buildShellBody
Builds the calendar shell body (6 weeks by 7 days)
|
void |
buildShellFooter
Builds the calendar shell footer.
|
void |
buildShellHeader
Builds the calendar shell header by inserting a THEAD into the local calendar table.
|
void |
clear
Clears the selected dates in the current calendar widget and sets the calendar
to the current month and year.
|
void |
clearAllBodyCellStyles
Removes all styles from all body cells in the current calendar table.
|
void |
clearElement
Clears the inner HTML, CSS class and style information from the specified cell.
|
void |
customConfig
This method is called when subclasses need to override configuration variables
or create new ones.
|
Date[] |
deselect
Deselects a date or a collection of dates on the current calendar.
|
Date[] |
deselectAll
Deselects all dates on the current calendar.
|
Date[] |
deselectCell
Deselects a date on the current calendar by referencing the index of the cell that should be deselected.
|
Date[] |
getSelectedDates
Gets the list of currently selected dates from the calendar.
|
void |
init
Initializes the calendar widget.
|
Boolean |
isDateOOM
Determines whether a given date is OOM (out of month).
|
void |
nextMonth
Navigates to the next month page in the calendar widget.
|
void |
nextYear
Navigates to the next year in the currently selected month in the calendar widget.
|
void |
onBeforeDeselect
Event executed before a date is deselected in the calendar widget.
|
void |
onBeforeSelect
Event executed before a date is selected in the calendar widget.
|
void |
onChangePage
Event executed when the user navigates to a different calendar page.
|
void |
onClear
Event executed when the calendar widget is completely cleared to the current month with no selections.
|
void |
onDeselect
Event executed when a date is deselected in the calendar widget.
|
void |
onRender
Event executed when the calendar widget is rendered.
|
void |
onReset
Event executed when the calendar widget is reset to its original state.
|
void |
onSelect
Event executed when a date is selected in the calendar widget.
|
void |
previousMonth
Navigates to the previous month page in the calendar widget.
|
void |
previousYear
Navigates to the previous year in the currently selected month in the calendar widget.
|
void |
render
Renders the calendar after it has been configured.
|
void |
renderBody
Appends the calendar body.
|
String |
renderBodyCellRestricted
Renders the current calendar cell as a non-selectable "black-out" date using the default
restricted style.
|
String |
renderCellDefault
Renders a single standard calendar cell in the calendar widget table.
|
String |
renderCellNotThisMonth
Applies the default style used for rendering dates that are not a part of the current
month (preceding or trailing the cells for the current month)
|
void |
renderCellStyleHighlight1
|
void |
renderCellStyleHighlight2
|
void |
renderCellStyleHighlight3
|
void |
renderCellStyleHighlight4
|
String |
renderCellStyleSelected
Applies the default style used for rendering selected dates to the current calendar cell
|
String |
renderCellStyleToday
Applies the default style used for rendering today's date to the current calendar cell
|
void |
renderFooter
Appends the contents of the calendar widget footer into the shell.
|
void |
renderHeader
Appends the header contents into the widget header.
|
Object |
renderOutOfBoundsDate
BEGIN BUILT-IN TABLE CELL RENDERERS
|
void |
renderRowFooter
Renders the row footer for a week.
|
void |
renderRowHeader
Renders the row header for a week.
|
void |
renderShell
Outputs the calendar shell to the DOM, inserting it into the placeholder element.
|
void |
reset
Resets the calendar widget to the originally selected month and year, and
sets the calendar to the initial selection(s).
|
void |
resetRenderers
Resets the render stack of the current calendar to its original pre-render value.
|
Date[] |
select
Selects a date or a collection of dates on the current calendar.
|
Date[] |
selectCell
Selects a date on the current calendar by referencing the index of the cell that should be selected.
|
void |
setMonth
Sets the calendar's month explicitly.
|
void |
setupConfig
This method is called to initialize the widget configuration variables, including
style, localization, and other display and behavioral options.
|
void |
setYear
Sets the calendar's year explicitly.
|
void |
subtractMonths
Subtracts the designated number of months from the current calendar month, and sets the current
calendar page date to the new month.
|
void |
subtractYears
Subtcats the designated number of years from the current calendar, and sets the current
calendar page date to the new month.
|
Boolean |
validate
Validates the calendar widget.
|
void |
wireCustomEvents
This function can be extended by subclasses to attach additional DOM events to
the calendar.
|
void |
wireDefaultEvents
Wires the local DOM events for the Calendar, including cell selection, hover, and
default navigation that is used for moving back and forth between calendar pages.
|
Object |
_getBrowser
END GETTER/SETTER METHODS
|
void |
addCssClass
Adds the specified CSS class to the element passed to this method.
|
void |
prependCssClass
|
void |
removeCssClass
Removed the specified CSS class from the element passed to this method.
|
void |
setCssClasses
Sets the specified array of CSS classes into the referenced element
|
Field Detail [top]
_pageDate
Date
_pageDate
A Date object representing the month/year that the calendar is initially set to
_renderStack
Array
_renderStack
A copy of the initial render functions created before rendering.
_selectedDates
Array
_selectedDates
The private list of initially selected dates.
cellDates
Array[](Integer[])
cellDates
The collection of calendar cell dates that is parallel to the cells collection. The array contains dates field arrays in the format of [YYYY, M, D].
cells
HTMLTableCellElement[]
cells
The collection of calendar table cells
Config
Object
Config
The configuration object used to set up the calendars various locale and style options.
headerCell
HTMLTableCellElement
headerCell
The HTML cell element that represents the main header cell TH used in the calendar table
id
String
id
The id that uniquely identifies this calendar. This id should match the id of the placeholder element on the page.
maxDate
Date
maxDate
A Date object representing the maximum selectable date
minDate
Date
minDate
A Date object representing the minimum selectable date
oDomContainer
HTMLElement
oDomContainer
The DOM element reference that points to this calendar's container element. The calendar will be inserted into this element when the shell is rendered.
pageDate
Date
pageDate
A Date object representing the month/year that the calendar is currently set to
parent
CalendarGroup
parent
The parent CalendarGroup, only to be set explicitly by the parent group
renderStack
Array[]
renderStack
The list of render functions, along with required parameters, used to render cells.
selectedDates
Array[](Integer[])
selectedDates
The list of currently selected dates. The data format for this local collection is
an array of date field arrays, e.g:
[
[2004,5,25],
[2004,5,26]
]
shellRendered
Boolean
shellRendered
A boolean indicating whether the shell of the calendar has already been rendered to the page
table
HTMLTableElement
table
The HTML table element that represents this calendar
today
Date
today
A Date object representing today's date.
weekFooterCells
HTMLTableCellElement[]
weekFooterCells
The collection of calendar week footer cells
weekHeaderCells
HTMLTableCellElement[]
weekHeaderCells
The collection of calendar week header cells
DATE
String
DATE
Type constant used for renderers to represent an individual date (M/D/Y)
DISPLAY_DAYS
Integer
DISPLAY_DAYS
Constant that represents the total number of date cells that are displayed in a given month
including
MONTH
String
MONTH
Type constant used for renderers to represent a month across any year
MONTH_DAY
String
MONTH_DAY
Type constant used for renderers to represent an individual date across any year (M/D)
RANGE
String
RANGE
Type constant used for renderers to represent a range of individual dates (M/D/Y-M/D/Y)
STOP_RENDER
String
STOP_RENDER
Constant used for halting the execution of the remainder of the render stack
WEEKDAY
String
WEEKDAY
Type constant used for renderers to represent a weekday
Constructor Detail [top]
YAHOO.widget.Calendar_Core
YAHOO.widget.Calendar_Core
()
- Parameters:
-
id
- The id of the table element that will represent the calendar widget -
containerId
- The id of the container element that will contain the calendar table -
monthyear
- The month/year string used to set the current calendar page -
selected
- A string of date values formatted using the date parser. The built-in default date format is MM/DD/YYYY. Ranges are defined using MM/DD/YYYY-MM/DD/YYYY. Month/day combinations are defined using MM/DD. Any combination of these can be combined by delimiting the string with commas. Example: "12/24/2005,12/25,1/18/2006-1/21/2006"
Method Detail [top]
_addRenderer
void
_addRenderer
The private method used for adding cell renderers to the local render stack.
This method is called by other methods that set the renderer type prior to the method call.
_fieldArraysAreEqual
Boolean
_fieldArraysAreEqual
Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
- Returns:
- The boolean that represents the equality of the two arrays
_indexOfSelectedFieldArray
Integer
_indexOfSelectedFieldArray
Gets the index of a date field array [yyyy,mm,dd] in the current list of selected dates.
- Returns:
- The index of the date field array within the collection of selected dates. -1 will be returned if the date is not found.
_parseDate
Array[](Integer[])
_parseDate
Converts a date string to a date field array
- Returns:
- A date field array representing the string passed to the method
_parseDates
Array[](Integer[])
_parseDates
Converts a multi or single-date string to an array of date field arrays
- Returns:
- An array of date field arrays
_parseRange
Array[](Integer[])
_parseRange
Converts a date range to the full list of included dates
- Returns:
- An array of date field arrays
_toDate
Date
_toDate
Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
- Returns:
- JavaScript Date object representing the date field array
_toFieldArray
Array[](Integer[])
_toFieldArray
Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
- Returns:
- Array of date field arrays
_unload
void
_unload
addMonthRenderer
void
addMonthRenderer
Adds a month to the render stack. The function reference passed to this method will be executed
when a date cell matches the month passed to this method.
addMonths
void
addMonths
Adds the designated number of months to the current calendar month, and sets the current
calendar page date to the new month.
addRenderer
void
addRenderer
Adds a renderer to the render stack. The function reference passed to this method will be executed
when a date cell matches the conditions specified in the date string for this renderer.
addWeekdayRenderer
void
addWeekdayRenderer
Adds a weekday to the render stack. The function reference passed to this method will be executed
when a date cell matches the weekday passed to this method.
addYears
void
addYears
Adds the designated number of years to the current calendar, and sets the current
calendar page date to the new month.
buildDayLabel
String
buildDayLabel
Builds the date digit that will be displayed in calendar cells
- Returns:
- The formatted day label
buildMonthLabel
String
buildMonthLabel
Builds the date label that will be displayed in the calendar header or
footer, depending on configuration.
- Returns:
- The formatted calendar month label
buildShell
void
buildShell
Builds the calendar table shell that will be filled in with dates and formatting.
This method calls buildShellHeader, buildShellBody, and buildShellFooter (in that order)
to construct the pieces of the calendar table. The construction of the shell should
only happen one time when the calendar is initialized.
buildShellBody
void
buildShellBody
Builds the calendar shell body (6 weeks by 7 days)
buildShellFooter
void
buildShellFooter
Builds the calendar shell footer. In the default implementation, there is
no footer.
buildShellHeader
void
buildShellHeader
Builds the calendar shell header by inserting a THEAD into the local calendar table.
clear
void
clear
Clears the selected dates in the current calendar widget and sets the calendar
to the current month and year.
clearAllBodyCellStyles
void
clearAllBodyCellStyles
Removes all styles from all body cells in the current calendar table.
clearElement
void
clearElement
Clears the inner HTML, CSS class and style information from the specified cell.
customConfig
void
customConfig
This method is called when subclasses need to override configuration variables
or create new ones. Values can be explicitly set as follows:
this.Config.Style.CSS_CELL = "newcalcell";
this.Config.Locale.MONTHS_SHORT = ["Jan", "Fév", "Mars", "Avr", "Mai", "Juin", "Juil", "Août", "Sept", "Oct", "Nov", "Déc"];
deselect
Date[]
deselect
Deselects a date or a collection of dates on the current calendar. This method, by default,
does not call the render method explicitly. Once deselection has completed, render must be
called for the changes to be reflected visually.
- Returns:
- Array of JavaScript Date objects representing all individual dates that are currently selected.
deselectAll
Date[]
deselectAll
Deselects all dates on the current calendar.
- Returns:
- Array of JavaScript Date objects representing all individual dates that are currently selected. Assuming that this function executes properly, the return value should be an empty array. However, the empty array is returned for the sake of being able to check the selection status of the calendar.
deselectCell
Date[]
deselectCell
Deselects a date on the current calendar by referencing the index of the cell that should be deselected.
This method is used to easily deselect a single cell (usually with a mouse click) without having to do
a full render. The selected style is removed from the cell directly.
- Returns:
- Array of JavaScript Date objects representing all individual dates that are currently selected.
getSelectedDates
Date[]
getSelectedDates
Gets the list of currently selected dates from the calendar.
- Returns:
- An array of currently selected JavaScript Date objects.
init
void
init
Initializes the calendar widget. This method must be called by all subclass constructors.
isDateOOM
Boolean
isDateOOM
Determines whether a given date is OOM (out of month).
- Returns:
- true if the date is OOM
nextMonth
void
nextMonth
Navigates to the next month page in the calendar widget.
nextYear
void
nextYear
Navigates to the next year in the currently selected month in the calendar widget.
onBeforeDeselect
void
onBeforeDeselect
Event executed before a date is deselected in the calendar widget.
onBeforeSelect
void
onBeforeSelect
Event executed before a date is selected in the calendar widget.
onChangePage
void
onChangePage
Event executed when the user navigates to a different calendar page.
onClear
void
onClear
Event executed when the calendar widget is completely cleared to the current month with no selections.
onDeselect
void
onDeselect
Event executed when a date is deselected in the calendar widget.
onRender
void
onRender
Event executed when the calendar widget is rendered.
onReset
void
onReset
Event executed when the calendar widget is reset to its original state.
onSelect
void
onSelect
Event executed when a date is selected in the calendar widget.
previousMonth
void
previousMonth
Navigates to the previous month page in the calendar widget.
previousYear
void
previousYear
Navigates to the previous year in the currently selected month in the calendar widget.
render
void
render
Renders the calendar after it has been configured. The render() method has a specific call chain that will execute
when the method is called: renderHeader, renderBody, renderFooter.
Refer to the documentation for those methods for information on
individual render tasks.
renderBody
void
renderBody
Appends the calendar body. The default implementation calculates the number of
OOM (out of month) cells that need to be rendered at the start of the month, renders those,
and renders all the day cells using the built-in cell rendering methods.
While iterating through all of the cells, the calendar checks for renderers in the
local render stack that match the date of the current cell, and then applies styles
as necessary.
renderBodyCellRestricted
String
renderBodyCellRestricted
Renders the current calendar cell as a non-selectable "black-out" date using the default
restricted style.
- Returns:
- YAHOO.widget.Calendar_Core.STOP_RENDER if rendering should stop with this style, null or nothing if rendering should not be terminated
renderCellDefault
String
renderCellDefault
Renders a single standard calendar cell in the calendar widget table.
All logic for determining how a standard default cell will be rendered is
encapsulated in this method, and must be accounted for when extending the
widget class.
- Returns:
- YAHOO.widget.Calendar_Core.STOP_RENDER if rendering should stop with this style, null or nothing if rendering should not be terminated
renderCellNotThisMonth
String
renderCellNotThisMonth
Applies the default style used for rendering dates that are not a part of the current
month (preceding or trailing the cells for the current month)
- Returns:
- YAHOO.widget.Calendar_Core.STOP_RENDER if rendering should stop with this style, null or nothing if rendering should not be terminated
renderCellStyleHighlight1
void
renderCellStyleHighlight1
renderCellStyleHighlight2
void
renderCellStyleHighlight2
renderCellStyleHighlight3
void
renderCellStyleHighlight3
renderCellStyleHighlight4
void
renderCellStyleHighlight4
renderCellStyleSelected
String
renderCellStyleSelected
Applies the default style used for rendering selected dates to the current calendar cell
- Returns:
- YAHOO.widget.Calendar_Core.STOP_RENDER if rendering should stop with this style, null or nothing if rendering should not be terminated
renderCellStyleToday
String
renderCellStyleToday
Applies the default style used for rendering today's date to the current calendar cell
- Returns:
- YAHOO.widget.Calendar_Core.STOP_RENDER if rendering should stop with this style, null or nothing if rendering should not be terminated
renderFooter
void
renderFooter
Appends the contents of the calendar widget footer into the shell. By default,
the calendar does not contain a footer, and this method must be implemented by
subclassing the widget.
renderHeader
void
renderHeader
Appends the header contents into the widget header.
renderOutOfBoundsDate
Object
renderOutOfBoundsDate
BEGIN BUILT-IN TABLE CELL RENDERERS
renderRowFooter
void
renderRowFooter
Renders the row footer for a week. The date passed in should be
the first date of the given week.
renderRowHeader
void
renderRowHeader
Renders the row header for a week. The date passed in should be
the first date of the given week.
renderShell
void
renderShell
Outputs the calendar shell to the DOM, inserting it into the placeholder element.
reset
void
reset
Resets the calendar widget to the originally selected month and year, and
sets the calendar to the initial selection(s).
resetRenderers
void
resetRenderers
Resets the render stack of the current calendar to its original pre-render value.
select
Date[]
select
Selects a date or a collection of dates on the current calendar. This method, by default,
does not call the render method explicitly. Once selection has completed, render must be
called for the changes to be reflected visually.
- Returns:
- Array of JavaScript Date objects representing all individual dates that are currently selected.
selectCell
Date[]
selectCell
Selects a date on the current calendar by referencing the index of the cell that should be selected.
This method is used to easily select a single cell (usually with a mouse click) without having to do
a full render. The selected style is applied to the cell directly.
- Returns:
- Array of JavaScript Date objects representing all individual dates that are currently selected.
setMonth
void
setMonth
Sets the calendar's month explicitly.
setupConfig
void
setupConfig
This method is called to initialize the widget configuration variables, including
style, localization, and other display and behavioral options.
Config: Container for the CSS style configuration variables.
Config.Style - Defines the CSS classes used for different calendar elements
CSS_CALENDAR : Container tableCSS_HEADER :CSS_HEADER_TEXT : Calendar headerCSS_FOOTER : Calendar footerCSS_CELL : Calendar day cellCSS_CELL_OOM : Calendar OOM (out of month) cellCSS_CELL_SELECTED : Calendar selected cellCSS_CELL_RESTRICTED : Calendar restricted cellCSS_CELL_TODAY : Calendar cell for today's dateCSS_ROW_HEADER : The cell preceding a row (used for week number by default)CSS_ROW_FOOTER : The cell following a row (not implemented by default)CSS_WEEKDAY_CELL : The cells used for labeling weekdaysCSS_WEEKDAY_ROW : The row containing the weekday label cellsCSS_BORDER : The border style used for the default UED renderingCSS_CONTAINER : Special container class used to properly adjust the sizing and floatCSS_NAV_LEFT : Left navigation arrowCSS_NAV_RIGHT : Right navigation arrowCSS_CELL_TOP : Outlying cell along the top rowCSS_CELL_LEFT : Outlying cell along the left rowCSS_CELL_RIGHT : Outlying cell along the right rowCSS_CELL_BOTTOM : Outlying cell along the bottom rowCSS_CELL_HOVER : Cell hover styleCSS_CELL_HIGHLIGHT1 : Highlight color 1 for styling cellsCSS_CELL_HIGHLIGHT2 : Highlight color 2 for styling cellsCSS_CELL_HIGHLIGHT3 : Highlight color 3 for styling cellsCSS_CELL_HIGHLIGHT4 : Highlight color 4 for styling cells
Config.Locale - Defines the locale string arrays used for localization
MONTHS_SHORT : Array of 12 months in short format ("Jan", "Feb", etc.)MONTHS_LONG : Array of 12 months in short format ("Jan", "Feb", etc.)WEEKDAYS_1CHAR : Array of 7 days in 1-character format ("S", "M", etc.)WEEKDAYS_SHORT : Array of 7 days in short format ("Su", "Mo", etc.)WEEKDAYS_MEDIUM : Array of 7 days in medium format ("Sun", "Mon", etc.)WEEKDAYS_LONG : Array of 7 days in long format ("Sunday", "Monday", etc.)DATE_DELIMITER : The value used to delimit series of multiple dates (Default: ",")DATE_FIELD_DELIMITER : The value used to delimit date fields (Default: "/")DATE_RANGE_DELIMITER : The value used to delimit date fields (Default: "-")MY_MONTH_POSITION : The value used to determine the position of the month in a month/year combo (e.g. 12/2005) (Default: 1)MY_YEAR_POSITION : The value used to determine the position of the year in a month/year combo (e.g. 12/2005) (Default: 2)MD_MONTH_POSITION : The value used to determine the position of the month in a month/day combo (e.g. 12/25) (Default: 1)MD_DAY_POSITION : The value used to determine the position of the day in a month/day combo (e.g. 12/25) (Default: 2)MDY_MONTH_POSITION : The value used to determine the position of the month in a month/day/year combo (e.g. 12/25/2005) (Default: 1)MDY_DAY_POSITION : The value used to determine the position of the day in a month/day/year combo (e.g. 12/25/2005) (Default: 2)MDY_YEAR_POSITION : The value used to determine the position of the year in a month/day/year combo (e.g. 12/25/2005) (Default: 3)
Config.Options - Defines other configurable calendar widget options
SHOW_WEEKDAYS : Boolean, determines whether to display the weekday headers (defaults to true)LOCALE_MONTHS : Array, points to the desired Config.Locale array (defaults to Config.Locale.MONTHS_LONG)LOCALE_WEEKDAYS : Array, points to the desired Config.Locale array (defaults to Config.Locale.WEEKDAYS_SHORT)START_WEEKDAY : Integer, 0-6, representing the day that a week begins onSHOW_WEEK_HEADER : Boolean, determines whether to display row headersSHOW_WEEK_FOOTER : Boolean, determines whether to display row footersHIDE_BLANK_WEEKS : Boolean, determines whether to hide extra weeks that are completely OOMNAV_ARROW_LEFT : String, the image path used for the left navigation arrowNAV_ARROW_RIGHT : String, the image path used for the right navigation arrow
setYear
void
setYear
Sets the calendar's year explicitly.
subtractMonths
void
subtractMonths
Subtracts the designated number of months from the current calendar month, and sets the current
calendar page date to the new month.
subtractYears
void
subtractYears
Subtcats the designated number of years from the current calendar, and sets the current
calendar page date to the new month.
validate
Boolean
validate
Validates the calendar widget. This method has no default implementation
and must be extended by subclassing the widget.
- Returns:
- Should return true if the widget validates, and false if it doesn't.
wireCustomEvents
void
wireCustomEvents
This function can be extended by subclasses to attach additional DOM events to
the calendar. By default, this method is unimplemented.
wireDefaultEvents
void
wireDefaultEvents
Wires the local DOM events for the Calendar, including cell selection, hover, and
default navigation that is used for moving back and forth between calendar pages.
_getBrowser
Object
_getBrowser
END GETTER/SETTER METHODS
addCssClass
void
addCssClass
Adds the specified CSS class to the element passed to this method.
prependCssClass
void
prependCssClass
removeCssClass
void
removeCssClass
Removed the specified CSS class from the element passed to this method.
setCssClasses
void
setCssClasses
Sets the specified array of CSS classes into the referenced element