This is the constructor used to instansiate date pickers. See the usage page for typical usage and examples.
new DatePicker([oDate])
Name | Type | Descripton |
oDate |
Date |
Optional.
This represents the date to be selected when the date picker is created.
The default value is new Date() .
|
Name | Descripton |
No methods. |
Name | Type | Descripton |
days |
String[] |
This should be an array containing the letters describing the seven days of the week starting with Monday. |
months |
String[] |
This should be an array containing the names of the twelwe months starting with January. |
Name | Descripton | ||||||
create
Syntax
Arguments
Return Type
|
This creates the HTMLElement object that represents the date picker. This element is returned. | ||||||
getDate
Syntax
ArgumentsNo Arguments. Return Type
|
Returns a date object representing the selected date. If no date is selected this returns null. | ||||||
getFirstWeekDay
Syntax
ArgumentsNo Arguments. Return Type
|
Returns the first day of the week | ||||||
getRedWeekDay
Syntax
ArgumentsNo Arguments. Return Type
|
Returns the red day of the week | ||||||
getShowNone
Syntax
ArgumentsNo Arguments. Return Type
|
Returns whether the none button is visible or not. | ||||||
getShowToday
Syntax
ArgumentsNo Arguments. Return Type
|
Returns whether the today button is visible or not. | ||||||
goToNextMonth
Syntax
ArgumentsNo Arguments. Return Type
|
Goes to the next month. | ||||||
goToPreviousMonth
Syntax
ArgumentsNo Arguments. Return Type
|
Goes to the previous month. | ||||||
goToToday
Syntax
ArgumentsNo Arguments. Return Type
|
Selects todays date and shows that month in the date picker. | ||||||
onchange
Syntax
ArgumentsNo Arguments. Return Type
|
This is the method that is called when the selected date is changed. Overload this method to receive notifications about the change. | ||||||
setDate
Syntax
Arguments
Return Type
|
Sets the selected date to the same date represented by the date object passed as argument. If you set the date to null then no date is selected. | ||||||
setFirstWeekDay
Syntax
Arguments
Return Type
|
Sets which day to show first in each week. The default value is 0 and that represents Monday according to the ISO standard. | ||||||
setRedWeekDay
Syntax
Arguments
Return Type
|
Sets which day of the week to be considered a red day. Default is 6 and that represents Sunday according to the ISO standard. | ||||||
setShowNone
Syntax
Arguments
Return Type
|
Sets whether the none button should be shown or not. | ||||||
setShowToday
Syntax
Arguments
Return Type
|
Sets whether the today button should be visible on the date picker. |
Name | Type | Descripton |
No fields. |
The fields leftArrowSrc and rightArrowSrc does not change the images of the button aftert the html element is created. You will have to recreate the html element to see the changes.