Class Rico.CalendarControl
Extends
Rico.Popup.
Implements a pop-up Gregorian calendar.
Dates of adoption of the Gregorian calendar vary by country - accurate as a US & British calendar from 14 Sept 1752 to present.
Mark special dates with calls to addHoliday()
Defined in: <ricoCalendar.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Rico.CalendarControl(id, options)
|
| Method Attributes | Method Name and Description |
|---|---|
|
addHoliday(d, m, y, desc, bgColor, txtColor)
Call before displaying calendar to highlight special days
|
|
|
atLoad()
|
|
|
close()
alias for closePopup
|
|
|
decMonth()
|
|
|
decYear()
|
|
|
incMonth()
|
|
|
incYear()
|
|
|
isValidMonth(yr, mo)
|
|
|
open(curval)
|
|
|
Prompt for year
|
|
|
setDateFmt(fmt)
|
|
|
WeekNbr(year, month, day)
|
- Methods borrowed from class Rico.Popup:
- closePopup, createPopup, createWindow, move, openPopup, setDiv
Class Detail
Rico.CalendarControl(id, options)
- Parameters:
- id
- unique identifier
- options
- object may contain any of the following:
- startAt
- week starts with 0=sunday, 1=monday? default=0
- showWeekNumber
- show week number in first column? default=0
- showToday
- show "Today is..." in footer? default=1
- cursorColor
- color used to highlight dates as the user moves their mouse, default=#FDD
- repeatInterval
- when left/right arrow is pressed, repeat action every x milliseconds, default=100
- dateFmt
- date format for return value (one of values accepted by Date#formatDate), default=ISO8601
- selectedDateBorder
- border to indicate currently selected date? default=#666666
- minDate
- earliest selectable date? default=today-50 years
- maxDate
- last selectable date? default=today+50 years
Method Detail
addHoliday(d, m, y, desc, bgColor, txtColor)
Call before displaying calendar to highlight special days
- Parameters:
- d
- day (1-31)
- m
- month (1-12)
- y
- year (0 implies a repeating holiday)
- desc
- description
- bgColor
- background color for cell displaying this day (CSS value, defaults to '#DDF')
- txtColor
- text color for cell displaying this day (CSS value), if not specified it is displayed with the same color as other days
atLoad()
close()
alias for closePopup
constructCalendar()
decMonth()
decYear()
incMonth()
incYear()
isValidMonth(yr, mo)
- Parameters:
- yr
- mo
- Returns:
- true if yr/mo is within minDate/MaxDate
open(curval)
- Parameters:
- curval
popDownMonth()
popUpMonth()
popUpYear()
Prompt for year
selectNow()
setDateFmt(fmt)
- Parameters:
- fmt
WeekNbr(year, month, day)
- Parameters:
- year
- month
- day