Zimlet JavaScript API Reference - DwtCalendar

Class DwtCalendar


Extends DwtComposite.

This class provides a calendar view.

Defined in: DwtCalendar.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DwtCalendar(params)
Creates a calendar widget
Field Summary
Field Attributes Field Name and Description
<static>  
DwtCalendar.DAY
Defines the "day" selection mode.
<static>  
DwtCalendar.FRI
Friday.
<static>  
DwtCalendar.MON
Monday.
<static>  
DwtCalendar.MONTH
Defines the "month" selection mode.
<static>  
DwtCalendar.SAT
Saturday.
<static>  
DwtCalendar.SUN
Sunday.
<static>  
DwtCalendar.THU
Thursday.
<static>  
DwtCalendar.TUE
Tuesday.
<static>  
DwtCalendar.WED
Wednesday.
<static>  
DwtCalendar.WEEK
Defines the "week" selection mode.
<static>  
DwtCalendar.WORK_WEEK
Defines the "work week" selection mode.
Method Summary
Method Attributes Method Name and Description
 
Adds an action listener.
 
Adds a date range listener.
 
Adds a selection listener.
 
Gets the date.
 
Gets the date range.
 
Gets the date value for the last cell that the most recent Drag-and-drop operation occurred over.
 
Gets the force roll over setting.
 
Gets the selection mode.
 
Gets the skip notify on page setting.
 
isSelected(cellId)
Checks if the cell is selected.
 
Removes an action listener.
 
Removes a date range listener.
 
Removes a selection listener.
 
setDate(date, skipNotify, forceRollOver, dblClick)
Sets the date.
 
setFirstDayOfWeek(firstDayOfWeek)
Sets the first date of week.
 
Sets the force roll over setting.
 
setHilite(dates, enable, clear)
Enables/disables the highlight (i.e.
 
Sets the mouse out day callback.
 
Sets the mouse over day callback.
 
setSelectionMode(selectionMode)
Sets the selection mode.
 
Sets the skip notify on page.
 
setWorkingWeek(workingDaysArray)
Sets the working week.
 
Returns a string representation of the object.
Methods borrowed from class DwtComposite:
addChild, cleanupSeparators, clear, dispose, getChild, getChildren, getNumChildren, getTabGroupMember, removeChild, removeChildren
Methods borrowed from class DwtControl:
addClassName, addControlListener, addDisposeListener, addListener, appendElement, blur, clearContent, clearHandler, condClassName, delClassName, focus, getBounds, getClassName, getContent, getCursor, getData, getDragBox, getDragSource, getDropTarget, getEnabled, getFocusElement, getH, getHtmlElement, getHTMLElId, getInsetBounds, getInsets, getLocation, getMargins, getOpacity, getOuterSize, getPosition, getScrollContainer, getScrollStyle, getSize, getTooltipBase, getToolTipContent, getVisibility, getVisible, getW, getX, getXW, getY, getYH, getZIndex, hasFocus, isAlertShown, isDisposed, isInitialized, isListenerRegistered, notifyListeners, preventContextMenu, preventSelection, removeAllListeners, removeControlListener, removeDisposeListener, removeListener, reparent, reparentHtmlElement, replaceElement, setBounds, setClassName, setContent, setCursor, setData, setDisplay, setDisplayState, setDragBox, setDragSource, setDropTarget, setEnabled, setEventPropagation, setFocusElement, setHandler, setHtmlElementId, setLocation, setOpacity, setPosition, setScrollStyle, setSize, setToolTipContent, setVisibility, setVisible, setZIndex, showAlert, zShow
Class Detail
DwtCalendar(params)
Creates a calendar widget
Author: Ross Dargahi, Roland Schemers.
Parameters:
{hash} params
a hash of parameters
{DwtComposite} params.parent
the parent widget
{string} params.className
the CSS class
{constant} params.posStyle
the positioning style (see Dwt)
{constant} params.firstDayOfWeek Optional, Default: DwtCalendar.SUN
the first day of the week
{boolean} params.forceRollOver Optional, Default: true
if true, then clicking on (or setting) the widget to a date that is not part of the current month (i.e. one of the grey prev or next month days) will result in the widget rolling the date to that month.
{array} params.workingDays
a list of days that are work days. This array assumes that index 0 is Sunday. Defaults to Mon-Fri being work days.
{boolean} params.hidePrevNextMo
a flag indicating whether widget should hide days of the previous/next month
{boolean} params.readOnly
a flag indicating that this widget is read-only (should not process events such as mouse clicks)
{boolean} params.showWeekNumber
a flag indicating whether widget should show week number
Field Detail
<static> DwtCalendar.DAY
Defines the "day" selection mode.

<static> DwtCalendar.FRI
Friday.

<static> DwtCalendar.MON
Monday.

<static> DwtCalendar.MONTH
Defines the "month" selection mode.

<static> DwtCalendar.SAT
Saturday.

<static> DwtCalendar.SUN
Sunday.

<static> DwtCalendar.THU
Thursday.

<static> DwtCalendar.TUE
Tuesday.

<static> DwtCalendar.WED
Wednesday.

<static> DwtCalendar.WEEK
Defines the "week" selection mode.

<static> DwtCalendar.WORK_WEEK
Defines the "work week" selection mode.
Method Detail
addActionListener(listener)
Adds an action listener.
Parameters:
{AjxListener} listener
the listener

addDateRangeListener(listener)
Adds a date range listener. Date range listeners are called whenever the date range of the calendar changes (i.e. when it rolls over due to a programatic action via #setDate or via user selection).
Parameters:
{AjxListener} listener
the listener

addSelectionListener(listener)
Adds a selection listener.
Parameters:
{AjxListener} listener
the listener

{Date} getDate()
Gets the date.
Returns:
{Date} the date

{Object} getDateRange()
Gets the date range.
Returns:
{Object} the range (range.start and range.end)

{Date} getDndDate()
Gets the date value for the last cell that the most recent Drag-and-drop operation occurred over. Typically it will be called by a DwtDropTarget listener when an item is dropped onto the mini calendar
Returns:
{Date} the date or null for none

{boolean} getForceRollOver()
Gets the force roll over setting. Force roll over is occurs when a date that is not part of the current month (i.e. one of the grey prev or next month days) will result in the widget rolling the date to that month.
Returns:
{boolean} true if force roll over is set

{constant} getSelectionMode()
Gets the selection mode.
Returns:
{constant} the selection mode

{boolean} getSkipNotifyOnPage()
Gets the skip notify on page setting.
Returns:
{boolean} true, do not notify selection

{boolean} isSelected(cellId)
Checks if the cell is selected.
Parameters:
{string} cellId
the cell id
Returns:
{boolean} true if the cell is the selected day

removeActionListener(listener)
Removes an action listener.
Parameters:
{AjxListener} listener
the listener

removeDateRangeListener(listener)
Removes a date range listener.
Parameters:
{AjxListener} listener
the listener

removeSelectionListener(listener)
Removes a selection listener.
Parameters:
{AjxListener} listener
the listener

setDate(date, skipNotify, forceRollOver, dblClick)
Sets the date.
Parameters:
{Date} date
the date
{boolean} skipNotify
if true, do not notify selection
{boolean} forceRollOver
if true, then clicking on (or setting) the widget to a date that is not part of the current month (i.e. one of the grey prev or next month days) will result in the widget rolling the date to that month.
{boolean} dblClick
if true, require a double click

setFirstDayOfWeek(firstDayOfWeek)
Sets the first date of week.
Parameters:
{constant} firstDayOfWeek
the first day of week

setForceRollOver(force)
Sets the force roll over setting. Force roll over is occurs when a date that is not part of the current month (i.e. one of the grey prev or next month days) will result in the widget rolling the date to that month.
Parameters:
{boolean} force
if true, force roll over

setHilite(dates, enable, clear)
Enables/disables the highlight (i.e. "bolding") on the dates in <dates>.
Parameters:
{object} dates
associative array of Date objects for which to enable/disable highlighting
{boolean} enable
if true, enable highlighting
{boolean} clear
if true, clear current highlighting

setMouseOutDayCallback(callback)
Sets the mouse out day callback.
Parameters:
{AjxCallback} callback
the callback

setMouseOverDayCallback(callback)
Sets the mouse over day callback.
Parameters:
{AjxCallback} callback
the callback

{constant} setSelectionMode(selectionMode)
Sets the selection mode.
Parameters:
selectionMode
Returns:
{constant} selectionMode the selection mode

setSkipNotifyOnPage(skip)
Sets the skip notify on page. This method notify (or not) selection when paging arrow buttons are clicked.
Parameters:
{boolean} skip
if true, do not notify selection

setWorkingWeek(workingDaysArray)
Sets the working week.
Parameters:
{array} workingDaysArray
an array of days

{string} toString()
Returns a string representation of the object.
Returns:
{string} a string representation of the object

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:27 GMT-0400 (EDT)