How can I set the datetimepicker dropdown to show Months only

前端 未结 5 969
夕颜
夕颜 2020-12-17 16:45

So instead of this showing up on clicking the dropdown menu.

I want the dropdown to be like this when clicked.

Thanks a lot for any help.

5条回答
  •  失恋的感觉
    2020-12-17 17:10

    Try using Format properties:

     dateTimePicker.Format = DateTimePickerFormat.Custom;
     dateTimePicker.CustomFormat = "MM";
    

提交回复
热议问题