A CalendarDay object represents a date in the Calendar control. Web developers can use this class in the DayRender event handler to programmatically access the properties of a date as it is rendered on the Calendar control. This allows them to specify the properties of the day (such as whether the date is selectable, selected, today’s date, or a weekend date) and programmatically control the appearance or behavior of the day.

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

Property

Description

Supported in .NET version

Date

This read-only property returns the date represented by an instance of this class. Property value is a  System.DateTime object that contains the date represented by an instance of this class. Web developers can control the appearance or behavior of the day, based on this value programmatically.

1.0,1.1, 2.0, 3.0, 3.5, 4.0

DayNumberText

This read-only property returns the string equivalent of the day number for the date represented by an instance of the CalendarDay class.

1.0,1.1, 2.0, 3.0, 3.5, 4.0

IsOtherMonth

This read-only property returns a value that indicates whether the date represented by an instance of this class is in a month other than the month displayed in the Calendar control. The property value is true if  the date represented by an instance of this class is in a month other than the month displayed in the Calendar control.

1.0,1.1, 2.0, 3.0, 3.5, 4.0

IsSelectable

This property is used to get or set a value that indicates whether the date represented by an instance of this class can be selected in the Calendar control. Web developers can programmatically control the appearance behavior of the day, based on property value. Its value is true if the date can be selected; otherwise, false.

1.0,1.1, 2.0, 3.0, 3.5, 4.0

IsSelected

This read-only property returns a value that indicates whether the date represented by an instance of this class is selected in the Calendar control.  Its value is true if the date represented by an instance of this class is selected in the Calendar control; otherwise, false.

1.0,1.1, 2.0, 3.0, 3.5, 4.0

IsToday

This read-only property returns a value that indicates whether the date represented by an instance of this class is the same date specified by the TodaysDate property of the Calendar control. Its value is true if the date represented by an instance of this class is the same date specified by the TodaysDate property of the Calendar control; otherwise, false.

1.0,1.1, 2.0, 3.0, 3.5, 4.0

IsWeekend

This read-only property returns a value that indicates whether the date represented by an instance of this class is a either Saturday or Sunday. Its value is true if the date represented by an instance of this class is either a Saturday or a Sunday; otherwise, false.

1.0,1.1, 2.0, 3.0, 3.5, 4.0