Calendar Documentation - Common

OboutInc.Calendar2 namespace

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


Properties - styles
propertyStyleFolder Path to the folder with style to use. Optional


Properties - Appearance settings
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. Optional
propertyYearSelectorType Specifies the year selector type. Available values are HtmlList and DropDownList.
Default value is HtmlList.Optional
propertyShowTimeSelector Displays a drop-down list for hours, for minutes and for seconds. 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


Properties - settings
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
propertyYearMinScroll Minimum year visible without using the scroll. Any year lower than this is visible when scrolling, inside DateMin, DateMax range. Optional
propertyDateMax Maximum date allowed. Any date greater than this is disabled. 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.
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
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


Properties - date picker mode only
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"
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


Globalization
propertyCultureName Sets the culture name that will be used. Default is "en-US". Optional


Methods
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(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)
  • 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.
  • Url - URL to open when clicked on special date.

"You are a God-send!! Thank you so much!!"

Olivia Phillips
Allstate