CalendarDay Class

 

Represents a date in the Calendar control.

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

System.Object
  System.Web.UI.WebControls.CalendarDay

type CalendarDay = class end

NameDescription
System_CAPS_pubmethodCalendarDay(DateTime, Boolean, Boolean, Boolean, Boolean, String)

Initializes a new instance of the CalendarDay class.

NameDescription
System_CAPS_pubpropertyDate

Gets the date represented by an instance of this class. This property is read-only.

System_CAPS_pubpropertyDayNumberText

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

System_CAPS_pubpropertyIsOtherMonth

Gets 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. This property is read-only.

System_CAPS_pubpropertyIsSelectable

Gets or sets a value that indicates whether the date represented by an instance of this class can be selected in the Calendar control.

System_CAPS_pubpropertyIsSelected

Gets a value that indicates whether the date represented by an instance of this class is selected in the Calendar control. This property is read-only.

System_CAPS_pubpropertyIsToday

Gets 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. This property is read-only.

System_CAPS_pubpropertyIsWeekend

Gets a value that indicates whether the date represented by an instance of this class is a either Saturday or Sunday. This property is read-only.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

A CalendarDay object represents a date in the Calendar control. You 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 you to determine 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.

For a list of initial property values for an instance of CalendarDay, see the CalendarDay constructor.

The following example demonstrates how to use the properties of a CalendarDay object to determine whether the date being rendered in the DayRender event is in the displayed month and do not fall on Saturday or Sunday. These dates are displayed in yellow. Note that the Day property of the DayRenderEventArgs object passed into the DayRender event handler is the CalendarDay object.

No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: