Calendar.TodaysDate Property

 

Gets or sets the value for today's date.

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

[<BrowsableAttribute(false)>]
member TodaysDate : DateTime with get, set

Property Value

Type: System.DateTime

A System.DateTime that contains the value that the Calendar considers to be today's date. If this property is not explicitly set, this date will be the date on the server.

Use the TodaysDate property to determine today's date. You can also use this property to programmatically set the value for today's date on the Calendar control. This property is set using a System.DateTime object.

System_CAPS_noteNote

This date might need to be adjusted to accommodate users who are in a different time zone.

The appearance of the date specified by the TodaysDate property can be customized by using the TodayDayStyle property.

System_CAPS_noteNote

If the VisibleDate property is not set, the date specified by the TodaysDate property determines which month is displayed in the Calendar control.

The following code example demonstrates how to use the TodaysDate property to programmatically set the value for today's date on the Calendar control.

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

.NET Framework
Available since 1.1
Return to top
Show: