Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ...

I want to select dates AJAx calender control.

can able to select after the current date.

but not able select previous date from current date.

ASP.NET
<asp:Label ID="lblstartdate" Text="Start Date" CssClass="lbl" runat="server"></asp:Label>
                       <AjaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1"  runat="server">
                           </AjaxToolkit:ToolkitScriptManager>
                           <asp:TextBox ID="txtstartdate" CssClass="txtbox" runat="server"></asp:TextBox>
                            <AjaxToolkit:CalendarExtender ID="calstartdate" TargetControlID="txtstartdate"
                                runat="server" Enabled="True" ></AjaxToolkit:CalendarExtender>
Posted

select previous date from current date.
C#
DateTime prevDate = currentDate.AddDays(-1);


There is no property like 'Previous Date' for calendar. If you want to have some date based on some time/day difference, use the methods exposed. If you have an arbit date then store it and refer it later.
 
Share this answer
 
I have miss to attach the

AjaxControlToolkit.dll

AjaxControlToolkit.dll.refresh

In BIN folder
 
Share this answer
 
Comments
BillW33 23-May-12 10:22am    
You should not post a comment to a solution or an addition to your question as a "Solution". Either add a comment to a previous solution by pressing the "Have a Question or Comment?" button or update your question by using the "Improve question" button.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900