Reputation: 127
On my form I have a clear button that is supposed to reset the form back to it's original settings, and as such, I need to de-select any dates a user has selected on my month calendar, but cannot figure out how to do this.
So, is there a way to remove all dates selected by the user on a month calendar?
Upvotes: 0
Views: 6502
Reputation: 2943
do you mean something like this: http://msdn.microsoft.com/en-us/library/system.windows.forms.monthcalendar.removeallboldeddates.aspx
Or something like this:
calendar.SetDate(DateTime.Now)
Upvotes: 1
Reputation: 3444
You can set the Selection start and end to a specific date.
var today = DateTime.Today;
monthCalendar1.SelectionStart = today;
monthCalendar1.SelectionEnd = today;
Upvotes: 1