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

Please let me know how to set up date time control in C# to select only month and year.
I did tried to set format as custom format and set custom format as "MM yyyy". but when it run it still shows date panal in date picker control.

I don't want to display the date selection panal to my user since it is of no use.

Please help me in this way.
Posted
Updated 29-Jun-11 22:27pm
v2

1 solution

What about setting
dateTimePicker1.ShowUpDown = true;

This show a spin button control (up-down control), rather than a drop-down calendar ?

Have you set DateTimePicker.Format to Custom ?
timePicker.Format=DateTimePickerFormat.Custom
 
Share this answer
 
v2
Comments
RDBurmon 7-May-11 5:15am    
yes
Kim Togo 7-May-11 6:48am    
See updated answer. I misread about, that you do not what to show a drop-down calendar.

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