ASP.NET Calendar - Documentation - Server side

Properties: appearance settings, settings, date picker mode only, advanced properties, CSS properties, Advanced CSS properties;  Methods;

<%@ Register TagPrefix="obout" Namespace="OboutInc.Calendar2" Assembly="obout_Calendar2_Net" %>

Properties - Appearance settings

Name Description
propertyMonthWidth Width of each month in pixels. Default is 250. Optional
propertyMonthHeight Height of each month in pixels. Default is 170. Optional
propertyMonthMarginWidth Width of the margin between months. Default is 10. Optional
propertyColumns Number of columns in the calendar. Default is 2. Optional
propertyRows Number of rows in the calendar. Default is 1. Optional
propertyTitleText The text that will be shown in the title of the calendar between left and right arrows.
Default value is today's date. Optional
propertyShowYearSelector Displays a drop-down list or a html list of years. It depends on the value of the property YearSelectorType. By default, it takes ±10 years from current year.
If DateMin and DateMax are defined, then the range is taken from those values.
If only one of these properties is defined, then that value is used and the second is ±10 years from current year. Default is false. Optional
propertyYearSelectorType Specifies the year selector type. Available values are HtmlList and DropDownList.
Default is HtmlList.Optional
propertyShowMonthSelector Displays a drop-down list or a html list of months. It depends on the value of the property MonthSelectorType. Default is false.Optional
propertyMonthSelectorType Specifies the month selector type. Available values are HtmlList and DropDownList.
Default is HtmlList.Optional
propertyShowTimeSelector Displays a drop-down list or a html list for hours, for minutes and for seconds. It depends on the value of the property TimeSelectorType. Default is false.Optional
propertyTimeSelectorType Specifies the time selector type. Available values are HtmlList and DropDownList.
Default is HtmlList.Optional
propertyShowHourSelector If false, then the hour selector if not visible. Default is true.Optional
propertyShowMinuteSelector If false, then the minute selector if not visible. Default is true.Optional
propertyShowSecondSelector If false, then the second selector if not visible. Default is true.Optional
propertyTextArrowLeft Any text or HTML for left arrow. Default value: <<. Optional
propertyTextArrowRight Any text or HTML for right arrow. Default value: >>. Optional
propertyShowOtherMonthDays If true, then dates for previous and next months are shown in the main month.
Default is true. Optional
propertyTextSelectTime Select time text. Default is Set. Optional

Properties - settings

Name Description
propertySpeed Scrolling speed. Default value: 25. Optional
propertyScrollBy Number of columns to scroll by. If this value is more than number of columns
defined in Columns, then calendar scrolls by blocks of months. For example,
if calendar has Columns=2, Rows=2 and ScrollBy=4,then view of January-April
would change to May-August. Optional
propertyDateToday A DateTime value representing today's date. Optional
Default value is today's date on the server.
propertyDateFirstMonth A DateTime value representing the first month to show in the calendar.
If not defined, then the value from DateToday is used. Optional
propertyDateMin Minimum date allowed. Any date lower than this is disabled. Optional
propertyDateMax Maximum date allowed. Any date greater than this is disabled. Optional
propertyYearMinScroll Minimum year visible without using the scroll. Any year lower than this is visible when scrolling, inside DateMin, DateMax range. Optional
propertyYearMaxScroll Maximum year visible without using the scroll. Any year bigger than this is visible when scrolling, inside DateMin, DateMax range. Optional
propertySelectedDate Changes when new date is selected and postback occured.
You can also set it to any DateTime value initially.
propertySelectedDates Changes when dates are selected and postback occured.
You can also set it to a list of DateTime values initially.
To allow multiple dates selection set MultiSelectedDates to true.
propertyMultiSelectedDates When true, multiple dates can be selected. Default value: false. Optional
propertyAllowDeselect When true, selected date can be deselected. Default value: true. Optional
propertyAllowSelectSpecial When true, special dates can be selected. Default value: true. Optional
propertyAllowSelectRegular Specifies whether regular dates can be selected. Default value: true. Optional
propertyOnClientDateChanged A client-side function name to call when a date is selected.
The function is called with the selected date as the only parameter. Optional
propertyOnClientDateMouseOver A client-side function name to call on date mouse over event.
The function is called with the calendar and date as parameters. Optional
propertyOnClientDateMouseOut A client-side function name to call on date mouse out event.
The function is called with the calendar and date as parameters. Optional
propertyOnClientMonthScrollLeft A client-side function name to call on left month scrolling.
The function is called with the calendar as parameter. Optional
propertyOnSwitchView A client-side function name to call on calendar switching view.
The function is called with the calendar as parameter. Optional
propertyOnClientMonthScrollRight A client-side function name to call on right month scrolling.
The function is called with the calendar as parameter. Optional
propertyAutoPostBack When true, calendar will automatically post back to the server when date is selected. Default value: false. Optional
propertyEnabledDateExpression A boolean expression that enables or disables certain dates. Optional

Check the EnabledDateExpression tutorial
propertySpecialDates A collection containing all special dates.
propertyYearSelectorScrollSpeed Specifies the scolling speed of the year selector.
Default value: 100 (milliseconds). Optional
propertyFirstYearSelectorScrollSpeed Specifies the amount of time till the year selector is starting to scroll.
Default value: 0 (milliseconds). Optional
propertyHourSelectorScrollSpeed Specifies the scolling speed of the hour selector.
Default value: 100 (milliseconds). Optional
propertyFirstHourSelectorScrollSpeed Specifies the amount of time till the hour selector is starting to scroll.
Default value: 0 (milliseconds). Optional
propertyMinuteSelectorScrollSpeed Specifies the scolling speed of the minute selector.
Default value: 100 (milliseconds). Optional
propertyFirstMinuteSelectorScrollSpeed Specifies the amount of time till the minute selector is starting to scroll.
Default value: 0 (milliseconds). Optional
propertySecondSelectorScrollSpeed Specifies the scolling speed of the second selector.
Default value: 100 (milliseconds). Optional
propertyFirstSecondSelectorScrollSpeed Specifies the amount of time till the second selector is starting to scroll.
Default value: 0 (milliseconds). Optional

Properties - date picker mode only

Name Description
propertyDatePickerMode A true/false value. When true, calendar is in date picker mode. Default value: false.
propertyTextBoxId ID of a textbox where to show the selected date.
propertyDatePickerImagePath Path to the image to be used as date picker button. Optional

Example: "/calendar/styles/icon2.gif"
propertyDatePickerImageTooltip Tooltip text for the image of a date picker button. Default value is Select date.Optional
propertyCSSDatePickerButton CSS class name for the date picker button. Optional
propertyEnabled Specify whether calendar should be enabled or not. Default value: true. Optional
propertyAlign Specify the position where calendar is displayed when in date picker mode.
Available values are Cursor, Left, Right, Above, Under.
Default value: Cursor. Optional

Check the Date picker align tutorial
propertyBeginDateCalendarId The ID of another calendar to be used as a starting date. When you want to
select a range of dates (airline tickets, for example) you can create the
first calendar, then in the second one you specify BeginDateCalendarId
with ID of the first. The calendars will work together then. Optional

Check the Date Range tutorial
propertyDatePickerSynchronize If true, calendar is synchronized with the textbox modifications.
Default is false. Optional
propertyOffsetLeft The horizontal offset of the calendar from the date picker button, in pixels.
Default is 0. Optional
propertyOffsetTop The vertical offset of the calendar from the date picker button, in pixels.
Default is 0. Optional
>propertyForcePosition If true, the date picker's edges may go beyond the visible window.
Default is false. Optional

CSS Properties

Name Description
propertyStyleFolder Path to the folder with style to use. Optional

Advanced CSS Properties

Name Description
propertyCSSPath Path to the css file. Optional
propertyCSSCalendar CSS class for the whole calendar. It is the DIV that holds everything.
propertyCSSTitle CSS class for the title, without the arrows.
propertyCSSArrowLeft CSS class for the left arrow.
propertyCSSArrowRight CSS class for the right arrow.
propertyCSSMonth CSS class for each month.
propertyCSSMonthTitle CSS class for each month title. It is the part where the current month
and current year are shown.
propertyCSSDayName CSS class for each day name (Mon, Tue, etc.)
propertyCSSDay CSS class for each day in a month.
propertyCSSDayOver CSS class for each day in a month when the mouse is over.
propertyCSSDayToday CSS class for today's date.
propertyCSSDayTodayOver CSS class for today's date when the mouse is over.
propertyCSSDayDisabled CSS class for a disabled date.
propertyCSSDayDisabledOver CSS class for a disabled date when the mouse is over.
propertyCSSDaySelected CSS class for a selected date.
propertyCSSDaySelectedOver CSS class for a selected date when the mouse is over.
propertyCSSDaySpecial CSS class for a special date. Each special date can have its own css class,
but if none were specified, then this value is used.
propertyCSSDaySpecialOver CSS class for a special date when the mouse is over.
Each special date can have its own css class,
but if none were specified, then this value is used.
propertyCSSYearSelectorTitle CSS class for the year selector's title.
propertyCSSYearSelectorContainer CSS class for the year selector's container.
propertyCSSYearSelectorArrowUp CSS class for the year selector's arrow up.
propertyCSSYearSelectorArrowDown CSS class for the year selector's arrow down.
propertyCSSYearSelector CSS class for the year container from the year selector list.
propertyCSSYearSelected CSS class for the selected year container from the year selector list.
propertyCSSMonthSelectorTitle CSS class for the month selector's title.
propertyCSSMonthSelectorContainer CSS class for the month selector's container.
propertyCSSMonthSelectorArrowUp CSS class for the month selector's arrow up.
propertyCSSMonthSelectorArrowDown CSS class for the month selector's arrow down.
propertyCSSMonthSelector CSS class for the month container from the month selector list.
propertyCSSMonthSelected CSS class for the selected month container from the month selector list.
propertyCSSSelectTime CSS class for selecting time button.
propertyCSSHourSelectorTitle CSS class for the hour selector's title.
propertyCSSHourSelectorContainer CSS class for the hour selector's container.
propertyCSSHourSelectorArrowUp CSS class for the hour selector's arrow up.
propertyCSSHourSelectorArrowDown CSS class for the hour selector's arrow down.
propertyCSSHourSelector CSS class for the hour container from the hour selector list.
propertyCSSHourSelected CSS class for the selected hour container from the hour selector list.
propertyCSSMinuteSelectorTitle CSS class for the minute selector's title.
propertyCSSMinuteSelectorContainer CSS class for the minute selector's container.
propertyCSSMinuteSelectorArrowUp CSS class for the minute selector's arrow up.
propertyCSSMinuteSelectorArrowDown CSS class for the minute selector's arrow down.
propertyCSSMinuteSelector CSS class for the minute container from the minute selector list.
propertyCSSMinuteSelected CSS class for the selected minute container from the minute selector list.
propertyCSSSecondSelectorTitle CSS class for the second selector's title.
propertyCSSSecondSelectorContainer CSS class for the second selector's container.
propertyCSSSecondSelectorArrowUp CSS class for the second selector's arrow up.
propertyCSSSecondSelectorArrowDown CSS class for the second selector's arrow down.
propertyCSSSecondSelector CSS class for the second container from the second selector list.
propertyCSSSecondSelected CSS class for the selected second container from the second selector list.

Advanced properties

Name Description
propertyCultureName Sets the culture name that will be used. Default is "en-US". Optional
propertyFullMonthNames A comma-delimeted string of full month names. By default, these are taken
from the defined culture, but you can set your own: "January,February,March,...".
Optional
propertyShortMonthNames A comma-delimeted string of short month names. By default, these are taken
from the defined culture, but you can set your own: "Jan,Feb,Mar,...".
Optional
propertyFullDayNames A comma-delimeted string of full day names. By default, these are taken
from the defined culture, but you can set your own: "Monday,Tuesday,Wednesday,...".
Optional
propertyShortDayNames A comma-delimeted string of short day names. By default, these are taken
from the defined culture, but you can set your own: "Mo,Tu,We,...".
Optional
propertyFirstDayOfWeek An integer value representing the first day of week. By default this is
taken from the culture, but you can set your own. 0=Sunday Optional
propertyDateFormat Takes a formatting string. By default this is taken from the culture,
but you can define your own. Optional

Check the DateFormat tutorial
propertyYearMonthFormat Month and year format for every month title.
propertyShowErrorAlert If true, the alert message in case of some error is visible. Default value is true.
propertyDisableEmbeddedScriptFileResource If true, the script file resource is disabled. Default value is false.

Methods

Name Description
methodAddSpecialDate Adds a new special date.

Overloaded methods:
AddSpecialDate(DateTime Date)
AddSpecialDate(DateTime Date, string ToolTip)
AddSpecialDate(DateTime Date, string ToolTip, string CSSClass)
AddSpecialDate(DateTime Date, string ToolTip, string CSSClass, string Url)
AddSpecialDate(DateTime Date, string ToolTip, string CSSClass, string CSSClassOver, string Url)
AddSpecialDate(int Year, int Month, int Day)
AddSpecialDate(int Year, int Month, int Day, string Tooltip)
AddSpecialDate(int Year, int Month, int Day, string Tooltip, string CSSClass)
AddSpecialDate(int Year, int Month, int Day, string Tooltip, string CSSClass, string Url)
AddSpecialDate(int Year, int Month, int Day, string Tooltip, string CSSClass, string CSSClassOver, string Url)
  • Date - a DateTime object
  • Year - year of this special date.
  • Month - month of this special date.
  • Day - day of this special date.
  • Tooltip - tooltip to display on mouse over.
  • CssClass - css class for the special date.
  • CssClassOver - css class for the special date when the mouse is over.
  • Url - URL to open when clicked on special date.
methodRemoveSpecialDate Removes a special date.

Overloaded methods:
RemoveSpecialDate(int index)
RemoveSpecialDate(DateTime data)
RemoveSpecialDate(int Year, int Month, int Day)
RemoveAllSpecialDates()
  • index - special date index from the collection
  • Date - a DateTime object
  • Year - year of this special date.
  • Month - month of this special date.
  • Day - day of this special date.