Easy Tutorial
❮ Mvc App Prop Webcontrol Listitem Enabled ❯

ASP.NET Calendar Control



Definition and Usage

The Calendar control is used to display a calendar in the browser.

This control can display a calendar for a month, allow users to select dates, and navigate to the previous or next month.


Properties

Property Description .NET
Caption The caption of the calendar. 2.0
CaptionAlign The alignment of the calendar caption text. 2.0
CellPadding The space between the cell borders and content, in pixels. 1.0
CellSpacing The space between cells, in pixels. 1.0
DayHeaderStyle The style for displaying the names of the days of the week. 1.0
DayNameFormat The format for displaying the names of the days of the week. 1.0
DayStyle The style for displaying the dates. 1.0
FirstDayOfWeek Which day is considered the first day of the week. 1.0
NextMonthText The text displayed for the next month link. 1.0
NextPrevFormat The format for the next and previous month links. 1.0
NextPrevStyle The style for displaying the next and previous month links. 1.0
OtherMonthDayStyle The style for displaying dates that are not in the current month. 1.0
PrevMonthText The text displayed for the previous month link. 1.0
runat Specifies that the control is a server control. Must be set to "server". 1.0
SelectedDate The selected date. 1.0
SelectedDates The selected dates. 1.0
SelectedDayStyle The style for the selected date. 1.0
SelectionMode How users can select dates. 1.0
SelectMonthText The text displayed for the month selection link. 1.0
SelectorStyle The style for the month and week selection links. 1.0
SelectWeekText The text displayed for the week selection link. 1.0
ShowDayHeader A boolean value indicating whether to display the header for the days of the week. 1.0
ShowGridLines A boolean value indicating whether to display grid lines between dates. 1.0
ShowNextPrevMonth A boolean value indicating whether to display the next and previous month links. 1.0
ShowTitle A boolean value indicating whether to display the title of the calendar. 1.0
TitleFormat The format for the calendar title. 1.0
TitleStyle The style for the calendar title. 1.0
TodayDayStyle The style for today's date. 1.0
TodaysDate Gets or sets the value for today's date. 1.0
UseAccessibleHeader Specifies whether to use <th> instead of <td> elements for the day headers. 2.0
VisibleDate Gets or sets the date that specifies the month to display in the Calendar control. 1.0
WeekendDayStyle The style for weekends. 1.0
OnDayRender The name of the function to execute when each day's cell is created.
OnSelectionChanged The name of the function to execute when the user selects a day, week, or month.
OnVisibleMonthChanged The name of the function to execute when the user navigates to a different month.

Web Control Standard Properties

For a complete description, visit Web Control Standard Properties.

Control Standard Properties

For a complete description, visit Control Standard Properties.


Try it Yourself - Examples

Calendar

Calendar 2

Calendar 3


❮ Mvc App Prop Webcontrol Listitem Enabled ❯