Hi!

I was wondering if anyone knew a way to have a date/time picker only allow the selection of months/years? Like January, 2010...etc and not the specific day of the week?

Kinda like the attached image.

Recommended Answers

All 2 Replies

One option is to set the Format property to Custom and in the CustomFormat property enter MMMM/yyyy, then change the ShowUpDown property to true. This will give you a date in the format of "July / 2010" with the ability to select the month or year and use the up/down arrows to the right of the date to cycle by month or year from the current selection showing in the picker.

Alternately you can still set the custom format for the displayed date, unfortunately I am not sure how to get the drop-down calendar to default to the month setting instead of date setting.

Hope this helps :) Please mark as solved if it resolves your issue.

This might be my best option. I would prefer the calendar drop to be months only, but in the absence of that, using the arrows might be the best option.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.