This documentation is archived and is not being maintained.

CalendarDay Constructor

Initializes a new instance of the CalendarDay class.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public CalendarDay(
	DateTime date,
	bool isWeekend,
	bool isToday,
	bool isSelected,
	bool isOtherMonth,
	string dayNumberText
)

Parameters

date
Type: System.DateTime

A System.DateTime object that contains the date represented by an instance of this class.

isWeekend
Type: System.Boolean

true to indicate that the date represented by an instance of this class is either a Saturday or a Sunday; otherwise, false.

isToday
Type: System.Boolean

true to indicate that the date represented by an instance of this class is the current date; otherwise, false.

isSelected
Type: System.Boolean

true to indicate that the date represented by an instance of this class is selected on the Calendar control; otherwise, false.

isOtherMonth
Type: System.Boolean

true to indicate that the date represented by an instance of this class is in a month other than the displayed month on the Calendar control; otherwise, false.

dayNumberText
Type: System.String

The day number for the date represented by this class.

Use this constructor to create and initialize a new instance of the CalendarDay class.

NoteNote:

Although this constructor is available, an instance of the CalendarDay class is not typically created dynamically.

The following table shows initial property values for an instance of CalendarDay.

Property

Initial Value

Date

The value of the date parameter.

DayNumberText

The value of the dayNumberText parameter.

IsOtherMonth

The value of the isOtherMonth parameter.

IsSelected

The value of the isSelected parameter.

IsToday

The value of the isToday parameter.

IsWeekend

The value of the isWeekEnd parameter.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Show: