Reputation: 41
Is there any way in C# forms to show only months and years selectable when we dropdown the date time picker control? I do not want the days to be selectable.
I do not want to use numeric up down. for selecting month and year.
Upvotes: 0
Views: 721
Reputation: 55
try this link using jquery plugin:
http://xdsoft.net/jqplugins/datetimepicker/
$j('dDatetime').datetimepicker({
format: 'Y/m/d A g:i',
formatTime: 'A g:i',
});
Upvotes: 0
Reputation: 9862
you can do this with CustomFormat:
dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
dateTimePicker1.CustomFormat = "MM/yyyy";
Upvotes: 1