Click here to Skip to main content
16,016,925 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
While click on text box How can i get calender as previous month calender in text box.
Posted

1 solution

You can change the selected date to previous month.
Here is source code that can help you.

C#
monthCalendar1.SetDate(DateTime.Now.AddDays(-30));
 
Share this answer
 
Comments
Unni R 10-Dec-15 3:16am    
its not working
Saad Saadi 10-Dec-15 3:24am    
What's the issue, you are having?
Unni R 10-Dec-15 3:27am    
<asp:TextBox ID="txtchkin" runat="server" Height="25px" Width="100px" ToolTip="Check In"
onkeypress="return OnlyDate(event)">
<cc1:CalendarExtender ID="txtchkin_CalendarExtender" runat="server"
Enabled="True" Format="dd/MMM/yyyy" TargetControlID="txtchkin">


while click on text box previous month calendar want to display
Saad Saadi 10-Dec-15 6:09am    
Need to know what plugin, you used for cc1:CalendarExtender?
Unni R 10-Dec-15 22:58pm    
ajax script manager

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