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

I am working on WINDOW FORM Application in C#, I have a text box when the user clicks on text box a calendar should appear, and the selected date should display on text box.
Posted

Look at a DateTimePicker[^] control - it does what you want!
 
Share this answer
 
Comments
manoharnch 11-Aug-11 4:08am    
Yes i already taken datetimepicker and hided it, when the user clicks on textbox the user can see the calender, but i am not getting the selected date in textbox.
OriginalGriff 11-Aug-11 4:12am    
Why not just use the DateTimePicker instead of the textbox? It drops down the calender, and returns to a TextBox-like state when the user has picked it. If you use a regular TextBox, then you risk the user entering a corrupt date directly - a DateTimePicker will not allow that.
Pritesh Aryan 11-Aug-11 9:29am    
Exactly!!
It is a bad UI design. You are using wrong controls. What is the problem with using DateTimePicker? It is meant to let user provide datetime input.
 
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