Click here to Skip to main content
15,890,995 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi how to hide calender after selecting date and insert into texbox.
Posted
Comments
Ravi chandran from thanjavur 15-Feb-12 5:41am    
how to do change the time for calender and then

i have click the date in calender display the textBox current system date and time how to show

This IS just one line code:

C#
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
   {
       TextBox1.Text = Calendar1.SelectedDate.ToString();
       Calendar1.Visible = false;
   }


or u can use jQuery
see this:

Show/Hide server control using JQuery[^]
 
Share this answer
 
v2
Comments
ythisbug 15-Feb-12 0:54am    
how to reduce size of calender..when i click on calender it should b big size after selecting should b n small size.how to give code for that??
CRDave1988 15-Feb-12 1:09am    
u can set Calendar1.Width, Calendar1.Height property but there is some limitation of minimum size if u want very small than u have to find some custome control on web like ajax or jQueryui.
CRDave1988 15-Feb-12 1:10am    
And if u get ur answer from any solution than don't forgot to mark that as an answer.
ythisbug 15-Feb-12 3:38am    
ok sure thanks..
Forget that calendar control just use ajax calender extender..
Here you go.. It is simplest in asp.net..
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Calendar/Calendar.aspx[^]
Definitely you'll like it..
All the best.. Accept the answer, If you like it.. :)
 
Share this answer
 
v2
why dont you use ajax calender extender.It suits your requirement.
 
Share this answer
 

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