Reference - SS.control.calendar - Calendar
Displays a calendar which can be used to set a date in another field.
Attributes:
Functions:
Attributes
css
Classname style
CSS style applied to the entire calendar. Setting this attribute overrides the
current style giving you the ability to fully customize the look of the calendar control.
s - {String} - style name
v1.0.0.20080527
[Top]
css_daysmonth
Days style
CSS style applied to all the cells containing days for the visible month.
Setting this attribute overrides the current style giving you the ability to fully customize the look of dates in the current visible month.
s - {String} - style name
v1.0.0.20080527
[Top]
css_daysmonthlast
Previous visible month dates
CSS style applied to the cells which contains the days that fall in the month previous to the one that is currently visible.
Setting this attribute overrides the current style giving you the ability to fully customize the look of dates falling in the previous visible month.
s - {String} - style name
v1.0.0.20080527
[Top]
css_daysmonthnext
Next visible month dates
CSS style applied to the cells which contains the days that fall in the month next to the one that is currently visible.
Setting this attribute overrides the current style giving you the ability to fully customize the look of dates falling in the next visible month.
s - {String} - style name
v1.0.0.20080527
[Top]
css_disabled
Disabled Date
CSS style applied to the cells which contains the days that fall outside of either the minimum or maximum date range values as specified in the
attributes datemin and datemax.
s - {String} - style name
v1.0.2.200808xx
[Top]
css_navigate
Navigate Month Buttons Style
CSS style applied to all the cells containing the navigate previous and next month buttons.
Setting this attribute overrides the current style giving you the ability to fully customize the look of navigate buttons.
s - {String} - style name
v1.0.0.20080527
[Top]
css_selecteddate
Calendar Selected Date Style
CSS style applied to the cell which contains the selected date in the calendar.
Setting this attribute overrides the current style giving you the ability to fully customize the look of the calendars selected date.
s - {String} - style name
v1.0.0.20080527
[Top]
css_title
Calendar Title Style
CSS style applied to the first row in the calendar which displays the visible year and month.
Setting this attribute overrides the current style giving you the ability to fully customize the look of the calendar title.
s - {String} - style name
v1.0.0.20080527
[Top]
css_titledays
Calendar Title Days Style
CSS style applied to the second row in the calendar which displays the days of the week.
Setting this attribute overrides the current style giving you the ability to fully customize the look of the calendar days.
s - {String} - style name
v1.0.0.20080527
[Top]
css_weekend
Calendar Weekend Date Style
CSS style applied to the columns which contains the days that fall in the weekend.
Setting this attribute overrides the current style giving you the ability to fully customize the look of dates falling in the weekend.
s - {String} - style name
v1.0.0.20080527
[Top]
datemax
Maximum Selectable Date
Maximum date range that can be selected. Any dates that fall beyond this date will be disabled thus
preventing their selection. Leave this setting empty to disabled the maximum date range (default).
d - {String} - String representation of date e.g. "2008/08/01"
v1.0.2.200808xx
[Top]
datemin
Minimum Selectable Date
Minimum date range that can be selected. Any dates that fall before this date will be disabled thus
preventing their selection. Leave this setting empty to disabled the minimum date range (default).
d - {String} - String representation of date e.g. "2008/07/01"
v1.0.2.200808xx
[Top]
dayformat
Day Name Format.
Sets how the day names should be formatted.
1 - {Number} (default) - Display the first letter of each day
2 - {Number} - Display two character abbreviation of the day name
3 - {Number} - Display three character abbreviation of the day name
full - {String} - Display the full day name
v1.0.0.20080527
[Top]
height
Height of Calendar
Sets the height of the calendar. Height must be expressed in pixel units e.g. 200px.
Percentages are not supported.
h - {String} - Height in px units
v1.0.0.20080527
[Top]
keys
Enable date selection by key press
If the calendar is linked to an element such as a textbox using the linkto attribute
and this value is set to true, then the arrow and enter keys can be used to to navigate around the calendar to
select a date
b - {Boolean} - (default = false)
v1.0.0.20080527
[Top]
linkto
Link To Control Id
Links the date value selected in the calendar to the value in another HTML control that
supports control.value. See localecode
or linktoformat attributes for ways to set the date format.
Default format is MM/dd/yyyy.
s - {String} - Id of the control to link to
v1.0.0.20080527
[Top]
linktoformat
Link To Control Date Format
Sets the date format that should be used when linking to a HTML control using the attribute
linktoid. Overrides all other date formats. Suggested formats include
MM/dd/yyyy (default), dd/MM/yyyy or yyyy/MM/dd.
Date formats are case sensitive. See SS.datetime documentation for
more information.
f - {String} (default = MM/dd/yyyy)
v1.0.0.20080527
[Top]
localecode
Locality Code.
Allows the default setting of the date format, month and day names to the
specified locality e.g. gb - Great Britain, de - Spain. The code is based
on the user language. See SS.locale documentation
for more details.
If the localecode is left blank then the code defaults to the global locale code as set in SS.global.locale
If the localecode is left blank then the code defaults to the global locale code as set in SS.global.locale
s : {String} - 2 character user language code.
v1.0.0.20080527
[Top]
monthformat
Month Name Format.
Sets how the month names should be formatted.
1 - {Number} - Display the first letter of each month
2 - {Number} - Display two character abbreviation of the month name
3 - {Number} - Display three character abbreviation of the month name
full - {String} (default) - Display the full month name
v1.0.0.20080527
[Top]
onchange
On Change Event Called Function
String function which is evaluated and then called when the selected date on the calendar changes.
f - {String} - Javascript function.
v1.0.0.20080527
[Top]
scroll
Mouse Scroll
Enables moving between dates by using the scroll wheel on the mouse. Set to true
to enable.
b : {Boolean} (default = true)
v1.0.2.2008xxxx
[Top]
selecteddate
Selected Calendar Date.
Date is stored in yyyy/MM/dd format to prevent any ambiguity.
s : {String} - Date in yyyy/MM/dd format
v1.0.0.20080527
[Top]
sevenweek
Seven week
If set, the calendar displays seven weeks.
Default = false.
b - {Boolean}
v1.0.0.20080527
[Top]
sundaylast
Sunday Last Date of Week
If set, the calendar to display Sunday as the last day of the week.
Default = true.
b - {Boolean}
v1.0.0.20080527
[Top]
visiblemonth
Visible Calendar Month.
This contains the visible month that the calendar is displaying. Note that this is different
to the selecteddate attribute as it is possible to have a date selected
and be looking in a completely different month. The dd part of the
date is ignored usually defaults to 01. Date is stored in yyyy/MM/dd format to prevent any ambiguity.
s : {String} - Date in yyyy/MM/dd format
v1.0.0.20080527
[Top]
width
Width of Calendar
Sets the width of the calendar. Width must be expressed in pixel units e.g. 200px.
Percentages are not supported.
w - {String} - Width in px units
v1.0.0.20080527
[Top]
Functions
dayChange
Change the selected date
Changes the selected calendar date by d days. Raises onchange event.
d - {Integer} (positive number increments days, negative number decrements days.
v1.0.0.20080527
[Top]
hide
Hide Calendar
Hides the calendar
None
None
v1.0.0.20080527
[Top]
setDate
Set Calendar Date.
Set the date and visible month of the calendar. Calling this function calls the render
function on the calendar object to display the change. The visible month is also set to
the month in the date passed. If date is not specified then date defaults to today.
Raises onchange event.
d - {Date} (optional)
v1.0.0.20080527
[Top]
setLocaleCode
Set the Locale Code
Sets the calendars locale code adjusting the day and date formatting defaults.
See SS.locale for more information on localaiztion.
ul - User Language code e.g. es, fr, gb, it, us
v1.0.0.20080527
[Top]
show
Show Calendar
Shows the calendar
None
None
v1.0.0.20080527
[Top]
visiblemonthchange
Change Calendar Visible Month
Change the visible month currently being displayed by the calendar.
d - {Date}
v1.0.0.20080527
[Top]