Name

Class xbCalendarCellNodeMap — a simple class that creates the link architecture for an individual table cell, registers event handlers on the cell's link, and saves the cell-index of the cell in xbCalendar's cells array. Contributed by Jeremy Hoppe.

Synopsis

extends Class xbObject

class xbCalendarCellNodeMap : xbObject
{ 
public: 
  xbCalendarCellNodeMap(Number cellIndex,
                        HTMLTableCellElement cellNode,
                        xbCalendar ownerCalendar);

  // properties
  Boolean               hidden;
  Number                index;
  HTMLAnchorElement     linkNode;
  HTMLTableCellElement  node;
     
  // methods 
  void  destroy();
}
    

See also:

Properties

hidden

readonly Boolean - true if the date-link inside the cell is hidden because it falls outside of the 'date range' defined by the xbCalendar widget's minDate and maxDate properties.

index

readonly Number - the index in the xbCalendar widget's cells array where this instance resides.

linkNode

readonly HTMLAnchorElement - the link (which contains a numbered date) that belongs to the node table-cell

node

readonly HTMLTableCellElement - a reference to the corresponding table-cell in the calendar's table.

Methods

xbCalendarCellNodeMap(Number index, HTMLTableCellElement node, xbCalendar ownerCalendar)

Constructs an instance of xbCalendarCellNodeMap

Arguments: 

  • Number index - the current index in the xbCalendar.cells array, which is also node's cellIndex in the calendar table.

  • HTMLTableCellElement node - the table cell which the link will be appended to.

  • xbCalendar ownerCalendar - the instance of xbCalendar that is currently building this calendar. Used to register event handlers.

destroy()

Destroys this instance of xbCalendarCellNodeMap.

Returns. Nothing