YAHOO.widget.CalendarGroup
Class YAHOO.widget.CalendarGroup
Object | +--YAHOO.widget.CalendarGroup
- Direct Known Subclasses:
- YAHOO.widget.Calendar2up
class
YAHOO.widget.CalendarGroup
Method Summary [top]
void |
addMonthRenderer
(month, fnRender)
Calls the addMonthRenderer function of all child calendars within the group.
|
void |
addRenderer
(sDates, fnRender)
Calls the addRenderer function of all child calendars within the group.
|
void |
addWeekdayRenderer
(weekday, fnRender)
Calls the addWeekdayRenderer function of all child calendars within the group.
|
void |
callChildFunction
(<String> fnName, <Array> args)
Calls a function within all child Calendars within this CalendarGroup.
|
void |
clear
()
Calls the clear function of all child calendars within the group.
|
YAHOO.widget.Calendar_Core |
constructChild
(<String> id,<String> containerId,<String> monthyear,<String> selected)
Constructs a child calendar.
|
Object |
deselect
(date)
Calls the deselect function of all child calendars within the group.
|
Object |
deselectAll
()
Calls the deselectAll function of all child calendars within the group.
|
Object |
deselectCell
(cellIndex)
Calls the deselectAll function of all child calendars within the group.
|
Date[] |
getSelectedDates
()
Gets the list of currently selected dates from the calendar.
|
void |
init
(<Integer> pageCount, <String> id, <String> containerId, <String> monthyear, <String> selected)
Initializes the calendar group.
|
void |
nextMonth
()
Calls the nextMonth function of all child calendars within the group.
|
void |
nextYear
()
Calls the nextYear function of all child calendars within the group.
|
void |
previousMonth
()
Calls the previousMonth function of all child calendars within the group.
|
void |
previousYear
()
Calls the previousYear function of all child calendars within the group.
|
void |
render
()
Calls the render function of all child calendars within the group.
|
void |
reset
()
Calls the reset function of all child calendars within the group.
|
Object |
select
(date)
Calls the select function of all child calendars within the group.
|
Object |
selectCell
(cellIndex)
Calls the selectCell function of all child calendars within the group.
|
void |
setChildFunction
(<String> fnName, <Function> fn)
Adds a function to all child Calendars within this CalendarGroup.
|
void |
setMonth
(<Integer> month)
Sets the calendar group's month explicitly.
|
void |
setYear
(<Integer> year)
Sets the calendar group's year explicitly.
|
Date[] |
sync
(<YAHOO.widget.Calendar_Core> caller)
Synchronizes the data values for all child calendars within the group.
|
string |
toString
()
Returns a string representation of the object.
|
void |
wireEvent
(<String> eventName, <Function> fn)
Sets an event handler universally across all child calendars within the group.
|
Constructor Detail [top]
YAHOO.widget.CalendarGroup
YAHOO.widget.CalendarGroup
()
- Parameters:
-
pageCount
- The number of pages that this calendar should display. -
id
- The id of the element that will be inserted into the DOM. -
containerId
- The id of the container element that the calendar will be inserted into. -
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]
addMonthRenderer
void
addMonthRenderer
(month, fnRender)
Calls the addMonthRenderer function of all child calendars within the group.
HASH(0x1decedc)
addRenderer
void
addRenderer
(sDates, fnRender)
Calls the addRenderer function of all child calendars within the group.
HASH(0x1decffc)
addWeekdayRenderer
void
addWeekdayRenderer
(weekday, fnRender)
Calls the addWeekdayRenderer function of all child calendars within the group.
HASH(0x1dab738)
callChildFunction
void
callChildFunction
(<String> fnName, <Array> args)
Calls a function within all child Calendars within this CalendarGroup.
- Parameters:
-
fnName
- The name of the function -
args
- The arguments to pass to the function
clear
void
clear
()
Calls the clear function of all child calendars within the group.
HASH(0x1eef9d8)
constructChild
YAHOO.widget.Calendar_Core
constructChild
(<String> id,<String> containerId,<String> monthyear,<String> selected)
Constructs a child calendar. This method can be overridden if a subclassed version of the default
calendar is to be used.
- Parameters:
-
id
- The id of the element that will be inserted into the DOM. -
containerId
- The id of the container element that the calendar will be inserted into. -
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"
- Returns:
- The YAHOO.widget.Calendar_Core instance that is constructed
deselect
Object
deselect
(date)
Calls the deselect function of all child calendars within the group.
HASH(0x1eefca8)
deselectAll
Object
deselectAll
()
Calls the deselectAll function of all child calendars within the group.
HASH(0x1eefdbc)
deselectCell
Object
deselectCell
(cellIndex)
Calls the deselectAll function of all child calendars within the group.
HASH(0x1eefed0)
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
(<Integer> pageCount, <String> id, <String> containerId, <String> monthyear, <String> selected)
Initializes the calendar group. All subclasses must call this method in order for the
group to be initialized properly.
- Parameters:
-
pageCount
- The number of pages that this calendar should display. -
id
- The id of the element that will be inserted into the DOM. -
containerId
- The id of the container element that the calendar will be inserted into. -
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"
nextMonth
void
nextMonth
()
Calls the nextMonth function of all child calendars within the group.
HASH(0x1ef02e4)
nextYear
void
nextYear
()
Calls the nextYear function of all child calendars within the group.
HASH(0x1ef0404)
previousMonth
void
previousMonth
()
Calls the previousMonth function of all child calendars within the group.
HASH(0x1ef0524)
previousYear
void
previousYear
()
Calls the previousYear function of all child calendars within the group.
HASH(0x1ef0644)
render
void
render
()
Calls the render function of all child calendars within the group.
HASH(0x1ef0764)
reset
void
reset
()
Calls the reset function of all child calendars within the group.
HASH(0x1dd6d10)
select
Object
select
(date)
Calls the select function of all child calendars within the group.
HASH(0x1dd6e30)
selectCell
Object
selectCell
(cellIndex)
Calls the selectCell function of all child calendars within the group.
HASH(0x1dd6f44)
setChildFunction
void
setChildFunction
(<String> fnName, <Function> fn)
Adds a function to all child Calendars within this CalendarGroup.
- Parameters:
-
fnName
- The name of the function -
fn
- The function to apply to each Calendar page object
setMonth
void
setMonth
(<Integer> month)
Sets the calendar group's month explicitly. This month will be set into the first
page of the multi-page calendar, and all other months will be iterated appropriately.
- Parameters:
-
month
- The numeric month, from 1 (January) to 12 (December)
setYear
void
setYear
(<Integer> year)
Sets the calendar group's year explicitly. This year will be set into the first
page of the multi-page calendar, and all other months will be iterated appropriately.
- Parameters:
-
year
- The numeric 4-digit year
sync
Date[]
sync
(<YAHOO.widget.Calendar_Core> caller)
Synchronizes the data values for all child calendars within the group. If the sync
method is called passing in the caller object, the values of all children will be set
to the values of the caller. If the argument is ommitted, the values from all children
will be combined into one distinct list and set into each child.
- Parameters:
-
caller
- The YAHOO.widget.Calendar_Core that is initiating the call to sync().
- Returns:
- Array of selected dates, in JavaScript Date object form.
toString
string
toString
()
Returns a string representation of the object.
HASH(0x1dd7550)
wireEvent
void
wireEvent
(<String> eventName, <Function> fn)
Sets an event handler universally across all child calendars within the group. For instance,
to set the onSelect handler for all child calendars to a function called fnSelect, the call would be:
calGroup.wireEvent("onSelect", fnSelect);
- Parameters:
-
eventName
- The name of the event to handler to set within all child calendars. -
fn
- The function to set into the specified event handler.