Hi to all.I need help regarding Calendar Control in ASP.NET. I've a TextBox in my page to enter a date.Now my requirement is to get a Calendar control when user enters into that TextBox to enter a Date and after selecting a date the calendar must be closed
automatically.Guys plz help me regarding this issue as it is my urgent requirement.By the way I'm using Visual Studio 2005 version and I'm not using any AJAX ControlToolkit.So plz suggest me other than AJAX Control Toolkit Examples.Thanks in Advance.
Now my requirement is to get a Calendar control when user enters into that TextBox to enter a Date and after selecting a date the calendar must be closed automatically.Guys plz help me regarding this issue as it is my urgent requirement.By the way I'm using
Visual Studio 2005 version and I'm not using any AJAX ControlToolkit.So plz suggest me other than AJAX Control Toolkit Examples.Thanks in Advance.
Jagan Mohan
Member
29 Points
79 Posts
How to Use Calendar Control in Visual Studio 2005 without using AJAX Control Toolkit?
Jul 09, 2012 04:15 AM|LINK
Hi to all.I need help regarding Calendar Control in ASP.NET. I've a TextBox in my page to enter a date.Now my requirement is to get a Calendar control when user enters into that TextBox to enter a Date and after selecting a date the calendar must be closed automatically.Guys plz help me regarding this issue as it is my urgent requirement.By the way I'm using Visual Studio 2005 version and I'm not using any AJAX ControlToolkit.So plz suggest me other than AJAX Control Toolkit Examples.Thanks in Advance.
cornball76
Participant
1126 Points
210 Posts
Re: How to Use Calendar Control in Visual Studio 2005 without using AJAX Control Toolkit?
Jul 09, 2012 04:18 AM|LINK
jQuery?
http://jqueryui.com/demos/datepicker/
Prince Sriva...
Contributor
2290 Points
419 Posts
Re: How to Use Calendar Control in Visual Studio 2005 without using AJAX Control Toolkit?
Jul 09, 2012 04:42 AM|LINK
You have to use Jquery plugin. imort the jquery file in your project and use datpicker in your (some simple jquery code).
http://jqueryui.com/demos/datepicker/
http://docs.jquery.com/UI/Datepicker
hope this will help you . if yes then mark as answer.
My Blog
ROHIT KUMAR SRIVASTAVA
Jagan Mohan
Member
29 Points
79 Posts
Re: How to Use Calendar Control in Visual Studio 2005 without using AJAX Control Toolkit?
Jul 09, 2012 05:59 AM|LINK
Hi Mr.Srivastava,Thanks for your reply.As I'm completely New to JQuery Plz suggest me any other Ideas.
Frank Jiang ...
All-Star
16006 Points
1728 Posts
Microsoft
Re: How to Use Calendar Control in Visual Studio 2005 without using AJAX Control Toolkit?
Jul 12, 2012 03:37 AM|LINK
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $("#TextBox1").click(function () { $("#Calendar1").show("hide"); }); }) </script> </head> <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:TextBox ID="TextBox1" runat="server" Height="21px" Width="150px"></asp:TextBox> <asp:Calendar ID="Calendar1" runat="server" Style="display: none" OnSelectionChanged="Calendar1_SelectionChanged"> </asp:Calendar> </div> </form> </body> </html>protected void Calendar1_SelectionChanged(object sender, EventArgs e) { TextBox1.Text = Calendar1.SelectedDate.ToShortDateString(); }Feedback to us
Develop and promote your apps in Windows Store