How to disable Previous dates in AjaxControlToolkit CalendarExtender control in ASP.Net


In this article I am going to explain how to disable the previous dates in AjaxControl Toolkit CalendarExtender control.


This example needs AjaxControlToolkit’s to be installed in your machine. I have explained the procedure to install AjaxControlToolkit in my previous article.



<!DOCTYPE html>
<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
        <asp:TextBox ID="txtCalendar" runat="server"></asp:TextBox>
        <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtCalendar"></asp:CalendarExtender>


protected void Page_Load(object sender, EventArgs e)
      //To Disable the Previous Dates in CalendarExtender control
      CalendarExtender1.StartDate = DateTime.Now; 

, , , , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s