Click here to Skip to main content
15,911,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to show only month and year to select in date-time picker in vb.net 2005 win application.

When user clicks on control instead of selection of day (normal calendar) it should show only month and year to select.
Posted

Try Siverlight Toolkit, check this out: monthyear-only-datepicker[^]
 
Share this answer
 
v3
Comments
Harshada J. 9-Jan-14 1:45am    
this is ajax control and can be used in web app. But i want in win app in visual studio 2005
Peter Leow 9-Jan-14 2:21am    
In this case, you may want to explore silverlight toolkit, see amended solution 1.
Harshada J. 9-Jan-14 22:04pm    
But can we use it with visual studio 2005 ??
Peter Leow 9-Jan-14 22:38pm    
Please read and explore.
Use Format property.
VB
dateTimePicker1.Format = DateTimePickerFormat.Custom
dateTimePicker1.CustomFormat = "MMMM yyyy" 'or whatever you want


Ref:-http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.format.aspx[^]
 
Share this answer
 
Comments
Harshada J. 9-Jan-14 22:02pm    
on screen it will show only month and year but if user clicks to select different month or year it show regular calendar with days. I don't want that.

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