Basic Date Picker Documentation

BasicDatePicker.VisibleDate Property

Gets or set the date that specifies the month to display when calendar is opened. Moves calendar to Month/Year of Date value supplied.

[Visual Basic]
Public Property VisibleDate As Date
[C#]
public System.DateTime VisibleDate {get; set;}

Property Value

A DateTime object that specifies the month to display on the BasicDatePicker control. The default is DateTime.MinValue (Null).

Remarks

Use the VisibleDate property to programmatically set the month to display on the BasicDatePicker control. The specified date can be any day in the month you want to display, although it is common to use the first date in the month.

This property is set using a DateTime object.

Example

[Visual Basic, C#] The following example demonstrates how to specify the VisibleDate property to programmatically set the value that determines the month that is displayed in the BasicDatePicker control.

[Visual Basic]
<%@ Page Language="VB" AutoEventWireup="true" %>
<%@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<html>
 <head>
    <title>Basic Date Picker VisibleDate Example</title>
     <script runat="server">
      Sub Page_Load(sender As Object, e As EventArgs)
         If Not IsPostBack Then
            ' Set SelectedDate to Today.
            this.BasicDatePicker1.VisibleDate = DateTime.Today.AddMonths(1)
        End If
     End Sub 'Page_Load
     </script>
 </head>
 <body>
     <form runat="server">
         <h3>Basic Date Picker VisibleDate Example</h3>
         >bdp:BasicDatePicker ID="BasicDatePicker1" runat="server"></bdp:BasicDatePicker>
     </form>
 </body>
</html>

[C#]
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<html>
 <head>
    <title>Basic Date Picker VisibleDate Example</title>
     <script runat="server">
     void Page_Load(Object sender, EventArgs e)
     {
        // Set VisibleDate to next month
        if (!IsPostBack)
            this.BasicDatePicker1.VisibleDate = DateTime.Today.AddMonths(1);
     }
     </script>
 </head>
 <body>
     <form runat="server">
         <h3>Basic Date Picker VisibleDate Example</h3>
         <bdp:BasicDatePicker ID="BasicDatePicker1" runat="server"></bdp:BasicDatePicker>
     </form>
 </body>
</html>

See Also

BasicDatePicker Class | BasicFrame.WebControls Namespace | SelectedDate