Basic Date Picker Documentation

BasicDatePicker.MinimumDate Property

Gets or sets the date that specifies the minimum allowable selectable date.

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

Property Value

A DateTime value representing the minimum allowable selectable date. Default value is DateTime.MinValue.

Example

[Visual Basic, C#] The following example demonstrates how to use the MinimumDate property to programmatically set the minimum allowable selectable date. All other dates before the MinimumDate will be disabled.

 [Visual Basic]
<%@ Page Language="VB" AutoEventWireup="true" %>
<%@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<html>
    <head>
        <title>Basic Date Picker MinimumDate Example</title>
        <script runat="server">
            Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
                If Not IsPostBack Then
                    ' Set SelectedDate to Today
                    ' Set MinimumDate to Today
                    this.BasicDatePicker1.SelectedDate = DateTime.Today
                    this.BasicDatePicker1.MinimumDate = DateTime.Today
                End If
            End Sub
        </script>
    </head>
    <body>
        <form runat="server">
            <h3>Basic Date Picker MinimumDate Example</h3>
            <bdp:BasicDatePicker ID="BasicDatePicker1" runat="server"></bdp:BasicDatePicker>
        </form>
    </body>
</html>
 
 [C#]
<%@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<%@ Page Language="C#" AutoEventWireup="true" debug="true"%>
<html>
    <head>
        <title>Basic Date Picker MinimumDate Example</title>
        <script runat="server">
            void Page_Load(Object sender, EventArgs e)
            {
                // Set SelectedDate to Today
                // Set MinimumDate to Today
                if (!IsPostBack)
                {
                    this.BasicDatePicker1.SelectedDate = DateTime.Today;
                    this.BasicDatePicker1.MinimumDate = DateTime.Today;
                }
            }
        </script>
    </head>
    <body>
        <form runat="server">
            <h3>Basic Date Picker MinimumDate Example</h3>
            <bdp:BasicDatePicker ID="BasicDatePicker1" runat="server"></bdp:BasicDatePicker>
        </form>
    </body>
</html>
 

See Also

BasicDatePicker Class | BasicFrame.WebControls Namespace | MaximumDate | IsDate | ReadOnly