Class net.nextdb.html.Calendar
Object
|
+--net.nextdb.html.Calendar
- class
net.nextdb.html.Calendar
// comment
// The calendar object has one function that
// returns an HTMLInput object that you can insert
// into the DOM. When the text field comes into
// focus a Calendar interface appears allowing the
// use to easily select a date. The date is converted
// into the appropriate format for the server so you
// can pass the value of the field to the server
// wholesale.
// optional color configuration
var colors = { "border":"rgb(200, 200, 200)",
"font":"rgb(8, 8, 8)",
"background":"rgb(255, 255, 255)",
"selectedBackground":"rgb(0, 88, 0)",
"selectedFont":"rgb(255, 255, 255)",
"mouseoverBackground":"rgb(200, 200, 200)",
"mouseoverFont":"rgb(0, 0, 0)"};
var cal = new net.nextdb.html.Calendar(new Date(), colors);
// get the HTML element
var input = cal.getElement();
Defined in api.docs.js
|
Method Summary |
Object
|
date()
|
HTMLElement
|
getElement()
|
void
|
setCallback(funct)
This sets a callback to retrieve the date string everytime the set button
is pressed.
|
void
|
setSelectType(type)
sets the type of user action that finalizes the date selection, BUTTON or DAYCLICK, defaults to BUTTON
|
net.nextdb.html.Calendar
net.nextdb.html.Calendar(date, colors)
Parameters:
date - optional date instance for pre-populating the form
colors - optional object for configuring/overriding the default color scheme, the object must have the following format : {"border":"rgb(200, 200, 200)","font":"rgb(8, 8, 8)","background":"rgb(255, 255, 255)","selectedBackground":"rgb(0, 88, 0)","selectedFont":"rgb(255, 255, 255)","mouseoverBackground":"rgb(200, 200, 200)","mouseoverFont":"rgb(0, 0, 0)"}
date
Object date()
getElement
HTMLElement getElement()
Returns:
input text element with the calendar attached
setCallback
void setCallback(funct)
This sets a callback to retrieve the date string everytime the set button
is pressed. You can either use this function for tracking the date or
just call input.value to get the value directly from the form element.
setSelectType
void setSelectType(type)
sets the type of user action that finalizes the date selection, BUTTON or DAYCLICK, defaults to BUTTON
Documentation generated by
JSDoc on Mon Mar 29 20:15:50 2010